make index counter checking use assertBusy

This commit is contained in:
Boaz Leskes 2016-02-13 14:09:14 +01:00
parent 57501ce5ff
commit 63ada9882e
2 changed files with 13 additions and 3 deletions

View File

@ -138,6 +138,16 @@ public class DiscoveryWithServiceDisruptionsIT extends ESIntegTestCase {
return 1; return 1;
} }
@Override
protected void beforeIndexDeletion() {
try {
// some test may leave opeations in flight. Wait for them to be finnished
assertBusy(() -> super.beforeIndexDeletion());
} catch (Exception e) {
throw new AssertionError(e);
}
}
private List<String> startCluster(int numberOfNodes) throws ExecutionException, InterruptedException { private List<String> startCluster(int numberOfNodes) throws ExecutionException, InterruptedException {
return startCluster(numberOfNodes, -1); return startCluster(numberOfNodes, -1);
} }