Skip to content

Commit d2587b1

Browse files
Merge branch 'main' into sa-fix-internal-cluster-tests
2 parents 0314186 + f2098e0 commit d2587b1

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

muted-tests.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,6 @@ tests:
7272
- class: org.elasticsearch.action.search.SearchPhaseControllerTests
7373
method: testProgressListener
7474
issue: https://github.com/elastic/elasticsearch/issues/116149
75-
- class: org.elasticsearch.search.basic.SearchWithRandomDisconnectsIT
76-
method: testSearchWithRandomDisconnects
77-
issue: https://github.com/elastic/elasticsearch/issues/116175
7875
- class: org.elasticsearch.xpack.deprecation.DeprecationHttpIT
7976
method: testDeprecatedSettingsReturnWarnings
8077
issue: https://github.com/elastic/elasticsearch/issues/108628
@@ -201,8 +198,6 @@ tests:
201198
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
202199
method: test {p0=ml/3rd_party_deployment/Test start deployment fails while model download in progress}
203200
issue: https://github.com/elastic/elasticsearch/issues/120810
204-
- class: org.elasticsearch.indices.mapping.UpdateMappingIntegrationIT
205-
issue: https://github.com/elastic/elasticsearch/issues/116126
206201
- class: org.elasticsearch.xpack.security.authc.service.ServiceAccountIT
207202
method: testAuthenticateShouldNotFallThroughInCaseOfFailure
208203
issue: https://github.com/elastic/elasticsearch/issues/120902

server/src/internalClusterTest/java/org/elasticsearch/search/basic/SearchWithRandomDisconnectsIT.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import org.elasticsearch.action.search.SearchResponse;
1515
import org.elasticsearch.action.support.PlainActionFuture;
1616
import org.elasticsearch.common.settings.Settings;
17+
import org.elasticsearch.common.util.concurrent.ListenableFuture;
1718
import org.elasticsearch.discovery.AbstractDisruptionTestCase;
1819
import org.elasticsearch.index.IndexModule;
1920
import org.elasticsearch.index.IndexSettings;
@@ -67,11 +68,15 @@ public void onFailure(Exception e) {
6768
}
6869

6970
private void runMoreSearches() {
70-
if (done.get() == false) {
71-
prepareRandomSearch().execute(this);
72-
} else {
73-
finishFuture.onResponse(null);
71+
while (done.get() == false) {
72+
final ListenableFuture<SearchResponse> f = new ListenableFuture<>();
73+
prepareRandomSearch().execute(f);
74+
if (f.isDone() == false) {
75+
f.addListener(this);
76+
return;
77+
}
7478
}
79+
finishFuture.onResponse(null);
7580
}
7681
});
7782
}

test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1783,7 +1783,7 @@ public void indexRandom(boolean forceRefresh, boolean dummyDocuments, boolean ma
17831783
}
17841784
}
17851785
for (CountDownLatch operation : inFlightAsyncOperations) {
1786-
safeAwait(operation);
1786+
safeAwait(operation, TEST_REQUEST_TIMEOUT);
17871787
}
17881788
if (bogusIds.isEmpty() == false) {
17891789
// delete the bogus types again - it might trigger merges or at least holes in the segments and enforces deleted docs!

0 commit comments

Comments
 (0)