Skip to content

Commit

Permalink
Fix testSearchAndRelocateConcurrently
Browse files Browse the repository at this point in the history
This aims to test we can search through replica shard relocations.
However, the way the test was written it was sometimes also starting
another data node. The concurrent search requests would sometimes
hit this new node, before its cluster state was RECOVERED.

The search action throws exception when the cluster state is not
recovered as it needs to be able to read the cluster state.

This fixes the test to not start new data nodes.
  • Loading branch information
andreidan committed Nov 14, 2024
1 parent 8cd4a26 commit 50832e9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,9 +171,6 @@ tests:
- class: org.elasticsearch.search.basic.SearchWithRandomDisconnectsIT
method: testSearchWithRandomDisconnects
issue: https://github.com/elastic/elasticsearch/issues/116175
- class: org.elasticsearch.search.basic.SearchWhileRelocatingIT
method: testSearchAndRelocateConcurrentlyRandomReplicas
issue: https://github.com/elastic/elasticsearch/issues/116145
- class: org.elasticsearch.xpack.deprecation.DeprecationHttpIT
method: testDeprecatedSettingsReturnWarnings
issue: https://github.com/elastic/elasticsearch/issues/108628
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public void run() {
for (int j = 0; j < threads.length; j++) {
threads[j].start();
}
allowNodes("test", between(1, 3));
allowNodes("test", between(1, 2));
ClusterRerouteUtils.reroute(client());
stop.set(true);
for (int j = 0; j < threads.length; j++) {
Expand Down

0 comments on commit 50832e9

Please sign in to comment.