**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
if (useSigText) {
            request2 = client().prepareSearch(INDEX_NAME)
                .addAggregation(
                    filter("0", QueryBuilders.termQuery(CLASS_FIELD, "0")).subAggregation(
                        significantText("sig_terms", TEXT_FIELD).minDocCount(1)
                            .backgroundFilter(QueryBuilders.termQuery(CLASS_FIELD, "1"))
                            .significanceHeuristic(significanceHeuristicExpectingSeparateSets)
                    )
                )
                .addAggregation(
                    filter("1", QueryBuilders.termQuery(CLASS_FIELD, "1")).subAggregation(
                        significantText("sig_terms", TEXT_FIELD).minDocCount(1)
                            .backgroundFilter(QueryBuilders.termQuery(CLASS_FIELD, "0"))
                            .significanceHeuristic(significanceHeuristicExpectingSeparateSets)
                    )
                );
        } else {
            request2 = client().prepareSearch(INDEX_NAME)
                .addAggregation(
                    filter("0", QueryBuilders.termQuery(CLASS_FIELD, "0")).subAggregation(
                        significantTerms("sig_terms").field(TEXT_FIELD)
                            .minDocCount(1)
                            .backgroundFilter(QueryBuilders.termQuery(CLASS_FIELD, "1"))
                            .significanceHeuristic(significanceHeuristicExpectingSeparateSets)
                    )
                )
                .addAggregation(
                    filter("1", QueryBuilders.termQuery(CLASS_FIELD, "1")).subAggregation(
                        significantTerms("sig_terms").field(TEXT_FIELD)
                            .minDocCount(1)