### CI Link

https://gradle-enterprise.elastic.co/s/4loz5k2jllcvg

### Repro line

`./gradlew ':server:internalClusterTest' --tests "org.elasticsearch.search.aggregations.metrics.HDRPercentilesIT.testScriptSingleValued" -Dtests.seed=928B8BBC20C73401 -Dtests.locale=de-CH -Dtests.timezone=America/Argentina/Catamarca -Druntime.java=19`

### Does it reproduce?

Yes

### Applicable branches

https://github.com/elastic/elasticsearch/pull/92817 (a small change over main)

### Failure history

_No response_

### Failure excerpt

I encountered this a few times in https://github.com/elastic/elasticsearch/pull/92817, which is effectively `main` plus the following patch which should not cause any failures:


```diff
diff --git a/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java b/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java
index 18f21cb7368..c51df18675c 100644
--- a/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java
+++ b/test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java
@@ -152,7 +152,6 @@ import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.greaterThan;
 import static org.hamcrest.Matchers.greaterThanOrEqualTo;
 import static org.hamcrest.Matchers.not;
-import static org.hamcrest.Matchers.nullValue;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertThat;
@@ -603,6 +602,8 @@ public final class InternalTestCluster extends TestCluster {
             );
         }

+        builder.put(INITIAL_STATE_TIMEOUT_SETTING.getKey(), "0s");
+
         return builder.build();
     }

@@ -731,14 +732,6 @@ public final class InternalTestCluster extends TestCluster {
         updatedSettings.put("node.name", name);
         updatedSettings.put(NodeEnvironment.NODE_ID_SEED_SETTING.getKey(), seed);

-        if (autoManageMasterNodes) {
-            assertThat(
-                "if master nodes are automatically managed then nodes must complete a join cycle when starting",
-                updatedSettings.get(INITIAL_STATE_TIMEOUT_SETTING.getKey()),
-                nullValue()
-            );
-        }
-
         return updatedSettings.build();
     }
```

The failure is as follows:

```
org.elasticsearch.search.aggregations.metrics.HDRPercentilesIT > testScriptSingleValued FAILED	
    java.lang.AssertionError: 	
    Expected: a value less than or equal to <10.00100068359375>	
         but: <10.0068359375> was greater than <10.00100068359375>	
        at __randomizedtesting.SeedInfo.seed([928B8BBC20C73401:2E3A0A78C1851C92]:0)	
        at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:18)	
        at org.junit.Assert.assertThat(Assert.java:956)	
        at org.junit.Assert.assertThat(Assert.java:923)	
        at org.elasticsearch.search.aggregations.metrics.HDRPercentilesIT.assertConsistent(HDRPercentilesIT.java:87)	
        at org.elasticsearch.search.aggregations.metrics.HDRPercentilesIT.testScriptSingleValued(HDRPercentilesIT.java:376)	
```
server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/metrics/HDRPercentilesIT.java
public class HDRPercentilesIT extends AbstractNumericTestCase {
    @Override
    protected Collection<Class<? extends Plugin>> nodePlugins() {
        return Collections.singleton(AggregationTestScriptsPlugin.class);
    }
    private static double[] randomPercentiles() {
        final int length = randomIntBetween(1, 20);
        final Set<Double> uniquedPercentiles = new HashSet<>();
        while (uniquedPercentiles.size() < length) {
            switch (randomInt(20)) {
                case 0 -> uniquedPercentiles.add(0.0);
                case 1 -> uniquedPercentiles.add(100.0);
                default -> uniquedPercentiles.add(randomDouble() * 100);
            }
        }
        double[] percentiles = uniquedPercentiles.stream().mapToDouble(Double::doubleValue).sorted().toArray();
        LogManager.getLogger(HDRPercentilesIT.class).info("Using percentiles={}", Arrays.toString(percentiles));
        return percentiles;
    }
    private static int randomSignificantDigits() {
        return randomIntBetween(0, 5);
    }
    private void assertConsistent(double[] pcts, Percentiles percentiles, long minValue, long maxValue, int numberSigDigits) {
        final List<Percentile> percentileList = CollectionUtils.iterableAsArrayList(percentiles);
        assertEquals(pcts.length, percentileList.size());