Skip to content

Commit 6043968

Browse files
authored
Fix testCancelViaExpirationOnRemoteResultsWithMinimizeRoundtrips test (#145130)
1 parent d4ba64c commit 6043968

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,6 @@ tests:
234234
- class: org.elasticsearch.packaging.test.DebMetadataTests
235235
method: test05CheckLintian
236236
issue: https://github.com/elastic/elasticsearch/issues/142819
237-
- class: org.elasticsearch.xpack.search.CrossClusterAsyncSearchIT
238-
method: testCancelViaExpirationOnRemoteResultsWithMinimizeRoundtrips
239-
issue: https://github.com/elastic/elasticsearch/issues/143407
240237
- class: org.elasticsearch.xpack.security.support.MetadataFlattenedMigrationIntegTests
241238
method: testMigrationWithConcurrentUpdates
242239
issue: https://github.com/elastic/elasticsearch/issues/143674

x-pack/plugin/async-search/src/internalClusterTest/java/org/elasticsearch/xpack/search/CrossClusterAsyncSearchIT.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,6 +1747,7 @@ public void testCancelViaExpirationOnRemoteResultsWithMinimizeRoundtrips() throw
17471747
request.setKeepOnCompletion(true);
17481748

17491749
final AsyncSearchResponse response = submitAsyncSearch(request);
1750+
final long asyncSearchExpirationTimeMillis = response.getExpirationTime();
17501751
try {
17511752
assertNotNull(response.getSearchResponse());
17521753
} finally {
@@ -1783,13 +1784,10 @@ public void testCancelViaExpirationOnRemoteResultsWithMinimizeRoundtrips() throw
17831784
remoteClusterSearchTask.get().cancelled()
17841785
);
17851786

1786-
AsyncSearchResponse asyncSearchResponse = getAsyncSearch(response.getId());
1787-
asyncSearchResponse.decRef();
1788-
17891787
// wait until the async search has expired (takes one second - keep alive can't be set lower than 1s)
17901788
// don't call get async search as that triggers cancellation of the task - we want to verify that we can cancel it
17911789
// as we get results from a remote cluster
1792-
assertBusy(() -> assertThat(System.currentTimeMillis(), greaterThanOrEqualTo(asyncSearchResponse.getExpirationTime())));
1790+
assertBusy(() -> assertThat(System.currentTimeMillis(), greaterThanOrEqualTo(asyncSearchExpirationTimeMillis)));
17931791

17941792
{
17951793
// check that the tasks are cancelled

0 commit comments

Comments
 (0)