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 {
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 {