File tree Expand file tree Collapse file tree 2 files changed +9
-7
lines changed
server/src/internalClusterTest/java/org/elasticsearch/search/basic Expand file tree Collapse file tree 2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 1414import org .elasticsearch .action .search .SearchResponse ;
1515import org .elasticsearch .action .support .PlainActionFuture ;
1616import org .elasticsearch .common .settings .Settings ;
17+ import org .elasticsearch .common .util .concurrent .ListenableFuture ;
1718import org .elasticsearch .discovery .AbstractDisruptionTestCase ;
1819import org .elasticsearch .index .IndexModule ;
1920import 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 }
You can’t perform that action at this time.
0 commit comments