**Build scan:**
https://gradle-enterprise.elastic.co/s/7vcre2by7feoe/tests/:server:internalClusterTest/org.elasticsearch.search.aggregations.bucket.SignificantTermsSignificanceScoreIT/testScriptScore

**Reproduction line:**
```
./gradlew ':server:internalClusterTest' --tests "org.elasticsearch.search.aggregations.bucket.SignificantTermsSignificanceScoreIT.testScriptScore" -Dtests.seed=3AF8B75C5D0AD4EA -Dtests.locale=es-PR -Dtests.timezone=EAT -Druntime.java=20
```

**Applicable branches:**
main

**Reproduces locally?:**
Yes

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.search.aggregations.bucket.SignificantTermsSignificanceScoreIT&tests.test=testScriptScore

**Failure excerpt:**
```
java.lang.Exception: Test abandoned because suite timeout was reached.

  at __randomizedtesting.SeedInfo.seed([3AF8B75C5D0AD4EA]:0)

```
server/src/internalClusterTest/java/org/elasticsearch/search/aggregations/bucket/SignificantTermsSignificanceScoreIT.java
"B\td",
            "A\tc d",
            "B\ta b" };
        List<IndexRequestBuilder> indexRequestBuilders = new ArrayList<>();
        for (int i = 0; i < data.length; i++) {
            String[] parts = data[i].split("\t");
            indexRequestBuilders.add(client().prepareIndex("test").setId("" + i).setSource("class", parts[0], "text", parts[1]));
        }
        indexRandom(true, false, indexRequestBuilders);
    }
    @AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/99690")
    public void testScriptScore() throws ExecutionException, InterruptedException, IOException {
        String type = randomBoolean() ? "text" : "long";
        indexRandomFrequencies01(type);
        ScriptHeuristic scriptHeuristic = getScriptSignificanceHeuristic();
        SearchRequestBuilder request;
        if ("text".equals(type) && randomBoolean()) {
            request = client().prepareSearch(INDEX_NAME)
                .addAggregation(
                    terms("class").field(CLASS_FIELD)
                        .subAggregation(
                            significantText("mySignificantTerms", TEXT_FIELD).significanceHeuristic(scriptHeuristic)
                                .minDocCount(1)
                                .shardSize(2)
                                .size(2)
                        )
                );
        } else {
            request = client().prepareSearch(INDEX_NAME)
                .addAggregation(