Skip to content

Commit aa842da

Browse files
authored
Merge pull request #1350 from jbonofre/AMQ-9617
AMQ-9617: Adjust consumers timeout to avoid race condition on RestTest
2 parents a621df7 + fa881ad commit aa842da

File tree

1 file changed

+2
-2
lines changed
  • activemq-web-demo/src/test/java/org/apache/activemq/web

1 file changed

+2
-2
lines changed

activemq-web-demo/src/test/java/org/apache/activemq/web/RestTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ public void testConsumeAsyncTimeout() throws Exception {
8888

8989
// AMQ-9330 - test no 500 error on timeout and instead 204 error
9090
Future<Result> result =
91-
asyncRequest(httpClient, "http://localhost:" + port + "/message/test?readTimeout=2000&type=queue&clientId=test", new StringBuffer());
91+
asyncRequest(httpClient, "http://localhost:" + port + "/message/test?readTimeout=1000&type=queue&clientId=test", new StringBuffer());
9292
// try a second request while the first is running, this should get a 500 error since the first is still running and
9393
// concurrent access to the same consumer is not allowed
94-
Future<Result> errorResult = asyncRequest(httpClient, "http://localhost:" + port + "/message/test?readTimeout=1&type=queue&clientId=test", new StringBuffer());
94+
Future<Result> errorResult = asyncRequest(httpClient, "http://localhost:" + port + "/message/test?readTimeout=10000&type=queue&clientId=test", new StringBuffer());
9595
assertEquals(HttpStatus.INTERNAL_SERVER_ERROR_500, errorResult.get().getResponse().getStatus());
9696
//After the original request finishes, verify 204 and not 500 error
9797
assertEquals(HttpStatus.NO_CONTENT_204, result.get().getResponse().getStatus());

0 commit comments

Comments
 (0)