From 3663f4c01e69f315ea806530b78a791789d6a8ee Mon Sep 17 00:00:00 2001 From: Erich Duda Date: Fri, 29 Jan 2016 09:57:49 +0100 Subject: [PATCH] ARTEMIS-368 - [Artemis Testsuite] TemporaryQueueTest#testBlockingWithTemporaryQueue fails --- .../tests/integration/client/TemporaryQueueTest.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TemporaryQueueTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TemporaryQueueTest.java index 2c47632c62..26a50d679e 100644 --- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TemporaryQueueTest.java +++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/TemporaryQueueTest.java @@ -570,7 +570,16 @@ public class TemporaryQueueTest extends SingleServerTestBase { Thread.sleep(100); } - while (t.isAlive() && errors.get() == 0 && !prod.getProducerCredits().isBlocked()) { + int blockedTime = 0; + + // https://issues.apache.org/jira/browse/ARTEMIS-368 + while (t.isAlive() && errors.get() == 0 && (!prod.getProducerCredits().isBlocked() || blockedTime < 60)) { + if (prod.getProducerCredits().isBlocked()) { + blockedTime++; + } + else { + blockedTime = 0; + } Thread.sleep(100); }