AMQ-6979 - fix test regression dependent on serial excution of expiry processing across destinations

This commit is contained in:
gtully 2018-05-31 13:12:38 +01:00
parent 51ec4590eb
commit 4521f47e36
1 changed files with 4 additions and 1 deletions

View File

@ -36,6 +36,8 @@ import org.apache.activemq.util.Wait;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import java.util.concurrent.TimeUnit;
public class DeadLetterExpiryTest extends DeadLetterTest { public class DeadLetterExpiryTest extends DeadLetterTest {
private static final Logger LOG = LoggerFactory.getLogger(DeadLetterExpiryTest.class); private static final Logger LOG = LoggerFactory.getLogger(DeadLetterExpiryTest.class);
@ -156,7 +158,8 @@ public class DeadLetterExpiryTest extends DeadLetterTest {
try { try {
QueueViewMBean queueViewMBean = getProxyToQueue("DLQ.auditConfigured"); QueueViewMBean queueViewMBean = getProxyToQueue("DLQ.auditConfigured");
LOG.info("Queue " + queueViewMBean.getName() + ", size:" + queueViewMBean.getQueueSize()); LOG.info("Queue " + queueViewMBean.getName() + ", size:" + queueViewMBean.getQueueSize());
return queueViewMBean.getQueueSize() == 4; // expiry across queues is no longer seralised on a single timertask thread AMQ-6979
return queueViewMBean.getQueueSize() >= 2;
} catch (Exception expectedTillExpiry) {} } catch (Exception expectedTillExpiry) {}
return false; return false;
} }