The recovery stats assertions in this test ran without any waiting for the recoveries to actually finish. The fact that they ran after the concurrent searches checks generally meant that they would pass (because of searches warming caches + general relative slowness of searches) but there is no hard guarantees this will work reliably as the pre-fetch threads which will update the recovery state might still be slow to do so randomly, causing the assertions to trip. closes #65302
This commit is contained in:
parent
b0cea04f95
commit
7fbdcb5e00
|
@ -64,6 +64,7 @@ import java.util.Set;
|
|||
import java.util.concurrent.BrokenBarrierException;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.CyclicBarrier;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
import java.util.stream.Stream;
|
||||
|
@ -700,8 +701,9 @@ public class SearchableSnapshotsIntegTests extends BaseSearchableSnapshotsIntegT
|
|||
}
|
||||
}
|
||||
|
||||
private void assertRecoveryStats(String indexName, boolean preWarmEnabled) {
|
||||
private void assertRecoveryStats(String indexName, boolean preWarmEnabled) throws Exception {
|
||||
int shardCount = getNumShards(indexName).totalNumShards;
|
||||
assertBusy(() -> {
|
||||
final RecoveryResponse recoveryResponse = client().admin().indices().prepareRecoveries(indexName).get();
|
||||
assertThat(recoveryResponse.toString(), recoveryResponse.shardRecoveryStates().get(indexName).size(), equalTo(shardCount));
|
||||
|
||||
|
@ -726,6 +728,7 @@ public class SearchableSnapshotsIntegTests extends BaseSearchableSnapshotsIntegT
|
|||
);
|
||||
}
|
||||
}
|
||||
}, 30L, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
private void assertSearchableSnapshotStats(String indexName, boolean cacheEnabled, List<String> nonCachedExtensions) {
|
||||
|
|
Loading…
Reference in New Issue