Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions muted-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -521,9 +521,6 @@ tests:
- class: org.elasticsearch.xpack.esql.qa.mixed.MixedClusterEsqlSpecIT
method: test {csv-spec:lookup-join.MvJoinKeyFromRowExpanded}
issue: https://github.com/elastic/elasticsearch/issues/132604
- class: org.elasticsearch.xpack.esql.plugin.DataNodeRequestSenderTests
method: testLimitConcurrentNodes
issue: https://github.com/elastic/elasticsearch/issues/132607
- class: org.elasticsearch.xpack.test.rest.XPackRestIT
method: test {p0=esql/60_usage/Basic ESQL usage output (telemetry) non-snapshot version}
issue: https://github.com/elastic/elasticsearch/issues/132608
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,13 +306,16 @@ public void testDoNotRetryCircuitBreakerException() {
}

public void testLimitConcurrentNodes() {
var targetShards = List.of(
targetShard(shard1, node1),
targetShard(shard2, node2),
targetShard(shard3, node3),
targetShard(shard4, node4),
targetShard(shard5, node5)
);
final int shards = 10;
var targetShards = new ArrayList<DataNodeRequestSender.TargetShard>(shards);
for (int i = 0; i < shards; i++) {
targetShards.add(
targetShard(
new ShardId("index", "n/a", i),
DiscoveryNodeUtils.builder("node-" + i).roles(Set.of(DATA_HOT_NODE_ROLE)).build()
)
);
}

var concurrency = randomIntBetween(1, 2);
AtomicInteger maxConcurrentRequests = new AtomicInteger(0);
Expand All @@ -335,10 +338,10 @@ public void testLimitConcurrentNodes() {
listener.onResponse(new DataNodeComputeResponse(DriverCompletionInfo.EMPTY, Map.of()));
});
}));
assertThat(sent.size(), equalTo(5));
assertThat(sent.size(), equalTo(shards));
assertThat(maxConcurrentRequests.get(), equalTo(concurrency));
assertThat(response.totalShards, equalTo(5));
assertThat(response.successfulShards, equalTo(5));
assertThat(response.totalShards, equalTo(shards));
assertThat(response.successfulShards, equalTo(shards));
assertThat(response.failedShards, equalTo(0));
}

Expand Down