diff --git a/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java b/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java index e17377b500d..6e3089a6d63 100644 --- a/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java +++ b/test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java @@ -373,18 +373,24 @@ public abstract class ESIntegTestCase extends ESTestCase { protected final void beforeInternal() throws Exception { final Scope currentClusterScope = getCurrentClusterScope(); + Callable setup = () -> { + cluster().beforeTest(random(), getPerTestTransportClientRatio()); + cluster().wipe(excludeTemplates()); + randomIndexTemplate(); + return null; + }; switch (currentClusterScope) { case SUITE: assert SUITE_SEED != null : "Suite seed was not initialized"; currentCluster = buildAndPutCluster(currentClusterScope, SUITE_SEED); + RandomizedContext.current().runWithPrivateRandomness(SUITE_SEED, setup); break; case TEST: currentCluster = buildAndPutCluster(currentClusterScope, randomLong()); + setup.call(); break; } - cluster().beforeTest(random(), getPerTestTransportClientRatio()); - cluster().wipe(excludeTemplates()); - randomIndexTemplate(); + } private void printTestMessage(String message) { diff --git a/test/framework/src/test/java/org/elasticsearch/test/test/SuiteScopeClusterIT.java b/test/framework/src/test/java/org/elasticsearch/test/test/SuiteScopeClusterIT.java index cd3c3b20323..4e0623cd134 100644 --- a/test/framework/src/test/java/org/elasticsearch/test/test/SuiteScopeClusterIT.java +++ b/test/framework/src/test/java/org/elasticsearch/test/test/SuiteScopeClusterIT.java @@ -41,7 +41,6 @@ public class SuiteScopeClusterIT extends ESIntegTestCase { @Test @SuppressForbidden(reason = "repeat is a feature here") @Repeat(iterations = 10, useConstantSeed = true) - @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/36202") public void testReproducible() throws IOException { if (ITER++ == 0) { CLUSTER_SEED = cluster().seed();