From f609c50fd0f7bf74602d79043bbd8d890c4c0a5d Mon Sep 17 00:00:00 2001 From: gtully Date: Tue, 1 Oct 2013 14:11:27 +0100 Subject: [PATCH] tidy up intermittent failure - BrokerViewSlowStoreStartupTest --- .../broker/jmx/BrokerViewSlowStoreStartupTest.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/jmx/BrokerViewSlowStoreStartupTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/jmx/BrokerViewSlowStoreStartupTest.java index c373fe7e89..6910bed277 100644 --- a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/jmx/BrokerViewSlowStoreStartupTest.java +++ b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/jmx/BrokerViewSlowStoreStartupTest.java @@ -80,6 +80,7 @@ public class BrokerViewSlowStoreStartupTest { try { broker.start(); } catch(Exception e) { + e.printStackTrace(); } } }); @@ -111,7 +112,7 @@ public class BrokerViewSlowStoreStartupTest { } })); - BrokerView view = broker.getAdminView(); + final BrokerView view = broker.getAdminView(); try { view.getBrokerName(); @@ -326,6 +327,12 @@ public class BrokerViewSlowStoreStartupTest { holdStoreStart.countDown(); startThread.join(); + Wait.waitFor(new Wait.Condition() { + @Override + public boolean isSatisified() throws Exception { + return view.getBroker() != null; + } + }); assertNotNull(view.getBroker()); try {