FullClusterRestartIT.testRecovery should wait for all initializing shards
Shards that are not fully bake may not execute the flush call, causing subsequent unexpected translog recoveries which fails the test. Closes #27817
This commit is contained in:
parent
69aabb7e40
commit
8f91743768
|
@ -698,6 +698,9 @@ public class FullClusterRestartIT extends ESRestTestCase {
|
|||
shouldHaveTranslog = randomBoolean();
|
||||
|
||||
indexRandomDocuments(count, true, true, i -> jsonBuilder().startObject().field("field", "value").endObject());
|
||||
|
||||
// make sure all recoveries are done
|
||||
ensureNoInitializingShards();
|
||||
// Explicitly flush so we're sure to have a bunch of documents in the Lucene index
|
||||
client().performRequest("POST", "/_flush");
|
||||
if (shouldHaveTranslog) {
|
||||
|
|
Loading…
Reference in New Issue