tidy up intermittent failure - BrokerViewSlowStoreStartupTest

This commit is contained in:
gtully 2013-10-01 14:11:27 +01:00
parent 9883ecffc3
commit f609c50fd0
1 changed files with 8 additions and 1 deletions

View File

@ -80,6 +80,7 @@ public class BrokerViewSlowStoreStartupTest {
try { try {
broker.start(); broker.start();
} catch(Exception e) { } catch(Exception e) {
e.printStackTrace();
} }
} }
}); });
@ -111,7 +112,7 @@ public class BrokerViewSlowStoreStartupTest {
} }
})); }));
BrokerView view = broker.getAdminView(); final BrokerView view = broker.getAdminView();
try { try {
view.getBrokerName(); view.getBrokerName();
@ -326,6 +327,12 @@ public class BrokerViewSlowStoreStartupTest {
holdStoreStart.countDown(); holdStoreStart.countDown();
startThread.join(); startThread.join();
Wait.waitFor(new Wait.Condition() {
@Override
public boolean isSatisified() throws Exception {
return view.getBroker() != null;
}
});
assertNotNull(view.getBroker()); assertNotNull(view.getBroker());
try { try {