Skip to content

Conversation

@Mikep86
Copy link
Contributor

@Mikep86 Mikep86 commented Sep 29, 2025

Fixes flaky semantic search CCS integration tests by making the following changes:

  • Ensure that the shard count does not exceed the data node count
  • Wait until all indices have green status
  • Wait until the local cluster is connected to the remote cluster

Fixes #135559 and #135573

@Mikep86 Mikep86 requested a review from a team September 29, 2025 14:18
@Mikep86 Mikep86 added >test Issues or PRs that are addressing/adding tests :SearchOrg/Relevance Label for the Search (solution/org) Relevance team labels Sep 29, 2025
@elasticsearchmachine elasticsearchmachine added the Team:Search - Relevance The Search organization Search Relevance team label Sep 29, 2025
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/search-relevance (Team:Search - Relevance)

Copy link
Member

@kderusso kderusso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

.cluster()
.prepareHealth(TEST_REQUEST_TIMEOUT, indexName)
.setWaitForYellowStatus()
.setWaitForGreenStatus()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should never be yellow if there are 0 replicas, only green, so maybe you could keep the wait for yellow status? But I'm OK leaving this as is as long as we don't think there's a testing hole

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, but if it should never be yellow then this check should be fine and IMO at the very least it clarifies the state we want the clusters to be in before starting tests.

RemoteInfoRequest request = new RemoteInfoRequest();
boolean connected;
int attempts = 0;
int delayInSeconds = 0;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be made simpler reusing assertBusy.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in f07145f

Copy link
Contributor

@dimitris-athanasiou dimitris-athanasiou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Mikep86 Mikep86 merged commit 614d23e into elastic:main Sep 29, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:SearchOrg/Relevance Label for the Search (solution/org) Relevance team Team:Search - Relevance The Search organization Search Relevance team >test Issues or PRs that are addressing/adding tests v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CI] SparseVectorQueryBuilderCrossClusterSearchIT testSparseVectorQueryWithCcsMinimizeRoundTripsFalse failing

4 participants