make index counter checking use assertBusy
This commit is contained in:
parent
57501ce5ff
commit
63ada9882e
|
@ -138,6 +138,16 @@ public class DiscoveryWithServiceDisruptionsIT extends ESIntegTestCase {
|
|||
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 {
|
||||
return startCluster(numberOfNodes, -1);
|
||||
}
|
||||
|
|
|
@ -308,8 +308,8 @@ public final class InternalTestCluster extends TestCluster {
|
|||
builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_INCOMING_RECOVERIES_SETTING.getKey(), RandomInts.randomIntBetween(random, 5, 10));
|
||||
builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_OUTGOING_RECOVERIES_SETTING.getKey(), RandomInts.randomIntBetween(random, 5, 10));
|
||||
} else if (random.nextInt(100) <= 90) {
|
||||
builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_INCOMING_RECOVERIES_SETTING.getKey(), RandomInts.randomIntBetween(random, 2, 5));
|
||||
builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_OUTGOING_RECOVERIES_SETTING.getKey(), RandomInts.randomIntBetween(random, 2, 5));
|
||||
builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_INCOMING_RECOVERIES_SETTING.getKey(), RandomInts.randomIntBetween(random, 2, 5));
|
||||
builder.put(ThrottlingAllocationDecider.CLUSTER_ROUTING_ALLOCATION_NODE_CONCURRENT_OUTGOING_RECOVERIES_SETTING.getKey(), RandomInts.randomIntBetween(random, 2, 5));
|
||||
}
|
||||
// always reduce this - it can make tests really slow
|
||||
builder.put(RecoverySettings.INDICES_RECOVERY_RETRY_DELAY_STATE_SYNC_SETTING.getKey(), TimeValue.timeValueMillis(RandomInts.randomIntBetween(random, 20, 50)));
|
||||
|
@ -554,7 +554,7 @@ public final class InternalTestCluster extends TestCluster {
|
|||
logger.info("changing cluster size from {} to {}, {} data nodes", size(), n + numSharedClientNodes, n);
|
||||
Set<NodeAndClient> nodesToRemove = new HashSet<>();
|
||||
int numNodesAndClients = 0;
|
||||
while (values.hasNext() && numNodesAndClients++ < size-n) {
|
||||
while (values.hasNext() && numNodesAndClients++ < size - n) {
|
||||
NodeAndClient next = values.next();
|
||||
nodesToRemove.add(next);
|
||||
removeDisruptionSchemeFromNode(next);
|
||||
|
|
Loading…
Reference in New Issue