Skip to content

Commit d4b2179

Browse files
Merge branch '9.3' into backport/9.3/pr-142386
2 parents 3ea3928 + 15f82b2 commit d4b2179

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

muted-tests.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,6 @@ tests:
171171
- class: org.elasticsearch.xpack.security.authc.AuthenticationServiceTests
172172
method: testInvalidToken
173173
issue: https://github.com/elastic/elasticsearch/issues/133328
174-
- class: org.elasticsearch.xpack.search.CrossClusterAsyncSearchIT
175-
method: testCancelViaExpirationOnRemoteResultsWithMinimizeRoundtrips
176-
issue: https://github.com/elastic/elasticsearch/issues/127302
177174
- class: org.elasticsearch.xpack.ml.integration.InferenceIT
178175
method: testInferClassificationModel
179176
issue: https://github.com/elastic/elasticsearch/issues/133448
@@ -213,9 +210,6 @@ tests:
213210
- class: org.elasticsearch.test.rest.yaml.RcsCcsCommonYamlTestSuiteIT
214211
method: test {p0=search.vectors/200_dense_vector_docvalue_fields/Enable docvalue_fields parameter for dense_vector fields}
215212
issue: https://github.com/elastic/elasticsearch/issues/136443
216-
- class: org.elasticsearch.xpack.search.CrossClusterAsyncSearchIT
217-
method: testRemoteClusterOnlyCCSWithFailuresOnAllShards
218-
issue: https://github.com/elastic/elasticsearch/issues/136894
219213
- class: org.elasticsearch.xpack.inference.DefaultEndPointsIT
220214
method: testMultipleInferencesTriggeringDownloadAndDeploy
221215
issue: https://github.com/elastic/elasticsearch/issues/117208

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

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import org.elasticsearch.ExceptionsHelper;
1111
import org.elasticsearch.ResourceNotFoundException;
1212
import org.elasticsearch.action.ActionFuture;
13+
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
1314
import org.elasticsearch.action.admin.cluster.node.tasks.cancel.CancelTasksRequest;
1415
import org.elasticsearch.action.admin.cluster.node.tasks.get.GetTaskRequest;
1516
import org.elasticsearch.action.admin.cluster.node.tasks.get.GetTaskResponse;
@@ -1946,14 +1947,19 @@ private Map<String, Object> setupTwoClusters() {
19461947
.setSettings(Settings.builder().put(remoteSettings.build()))
19471948
.setMapping("@timestamp", "type=date", "f", "type=text")
19481949
);
1949-
assertFalse(
1950-
client(REMOTE_CLUSTER).admin()
1951-
.cluster()
1952-
.prepareHealth(TEST_REQUEST_TIMEOUT, remoteIndex)
1953-
.setWaitForYellowStatus()
1954-
.setTimeout(TimeValue.timeValueSeconds(10))
1955-
.get()
1956-
.isTimedOut()
1950+
// Wait for yellow and no initializing shards so all assigned shards are STARTED before tests run searches.
1951+
ClusterHealthResponse healthResponse = client(REMOTE_CLUSTER).admin()
1952+
.cluster()
1953+
.prepareHealth(TEST_REQUEST_TIMEOUT, remoteIndex)
1954+
.setWaitForYellowStatus()
1955+
.setWaitForNoInitializingShards(true)
1956+
.setTimeout(TimeValue.timeValueSeconds(10))
1957+
.get();
1958+
assertFalse("remote index health check timed out", healthResponse.isTimedOut());
1959+
assertEquals(
1960+
"remote index should have no initializing shards, had: " + healthResponse.getInitializingShards(),
1961+
0,
1962+
healthResponse.getInitializingShards()
19571963
);
19581964
indexDocs(client(REMOTE_CLUSTER), remoteIndex);
19591965

0 commit comments

Comments
 (0)