diff --git a/x-pack/plugin/async-search/src/test/java/org/elasticsearch/xpack/search/AsyncSearchIntegTestCase.java b/x-pack/plugin/async-search/src/test/java/org/elasticsearch/xpack/search/AsyncSearchIntegTestCase.java index a959cb79c05..a2b17bb2237 100644 --- a/x-pack/plugin/async-search/src/test/java/org/elasticsearch/xpack/search/AsyncSearchIntegTestCase.java +++ b/x-pack/plugin/async-search/src/test/java/org/elasticsearch/xpack/search/AsyncSearchIntegTestCase.java @@ -184,7 +184,6 @@ public abstract class AsyncSearchIntegTestCase extends ESIntegTestCase { return new SearchResponseIterator() { private AsyncSearchResponse response = initial; - private int lastVersion = initial.getVersion(); private int shardIndex = 0; private boolean isFirst = true; private int shardFailures = 0; @@ -219,15 +218,9 @@ public abstract class AsyncSearchIntegTestCase extends ESIntegTestCase { } shardLatchArray[shardIndex++].countDown(); } - assertBusy(() -> { - AsyncSearchResponse newResp = client().execute(GetAsyncSearchAction.INSTANCE, - new GetAsyncSearchAction.Request(response.getId()) - .setWaitForCompletion(TimeValue.timeValueMillis(10))).get(); - atomic.set(newResp); - assertNotEquals(lastVersion, newResp.getVersion()); - }); - AsyncSearchResponse newResponse = atomic.get(); - lastVersion = newResponse.getVersion(); + AsyncSearchResponse newResponse = client().execute(GetAsyncSearchAction.INSTANCE, + new GetAsyncSearchAction.Request(response.getId()) + .setWaitForCompletion(TimeValue.timeValueMillis(10))).get(); if (newResponse.isRunning()) { assertThat(newResponse.status(), equalTo(RestStatus.OK));