ARTEMIS-368 - [Artemis Testsuite] TemporaryQueueTest#testBlockingWithTemporaryQueue fails

This commit is contained in:
Erich Duda 2016-01-29 09:57:49 +01:00
parent f149e76b3f
commit 3663f4c01e
1 changed files with 10 additions and 1 deletions

View File

@ -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);
}