This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch activemq-6.1.x
in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/activemq-6.1.x by this push:
new 28b365fb7d AMQ-9617: Adjust consumers timeout to avoid race condition
on RestTest
28b365fb7d is described below
commit 28b365fb7d573d43009f3b406d43a80ab911a878
Author: JB Onofré <[email protected]>
AuthorDate: Fri Nov 8 10:28:29 2024 +0000
AMQ-9617: Adjust consumers timeout to avoid race condition on RestTest
(cherry picked from commit fa881ad294519f424f0c7500fe4cb30915617e56)
---
activemq-web-demo/src/test/java/org/apache/activemq/web/RestTest.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/activemq-web-demo/src/test/java/org/apache/activemq/web/RestTest.java
b/activemq-web-demo/src/test/java/org/apache/activemq/web/RestTest.java
index 23c096292c..fe383d88d9 100644
--- a/activemq-web-demo/src/test/java/org/apache/activemq/web/RestTest.java
+++ b/activemq-web-demo/src/test/java/org/apache/activemq/web/RestTest.java
@@ -88,10 +88,10 @@ public class RestTest extends JettyTestSupport {
// AMQ-9330 - test no 500 error on timeout and instead 204 error
Future<Result> result =
- asyncRequest(httpClient, "http://localhost:" + port +
"/message/test?readTimeout=2000&type=queue&clientId=test", new StringBuffer());
+ asyncRequest(httpClient, "http://localhost:" + port +
"/message/test?readTimeout=1000&type=queue&clientId=test", new StringBuffer());
// try a second request while the first is running, this should get a
500 error since the first is still running and
// concurrent access to the same consumer is not allowed
- Future<Result> errorResult = asyncRequest(httpClient,
"http://localhost:" + port +
"/message/test?readTimeout=1&type=queue&clientId=test", new StringBuffer());
+ Future<Result> errorResult = asyncRequest(httpClient,
"http://localhost:" + port +
"/message/test?readTimeout=10000&type=queue&clientId=test", new StringBuffer());
assertEquals(HttpStatus.INTERNAL_SERVER_ERROR_500,
errorResult.get().getResponse().getStatus());
//After the original request finishes, verify 204 and not 500 error
assertEquals(HttpStatus.NO_CONTENT_204,
result.get().getResponse().getStatus());
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact