Skip to content

Commit 49eb1f8

Browse files
authored
Fix ClusterRequestTests (#121570) (#121618)
The upper bound of randomVersionBetween is inclusive; therefore, for testing the fallback version of the request, we need to use the version preceding 8.16.0 rather than 8.16.0 itself. Closes #117937
1 parent 9fa215a commit 49eb1f8

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,6 @@ tests:
269269
- class: org.elasticsearch.threadpool.SimpleThreadPoolIT
270270
method: testThreadPoolMetrics
271271
issue: https://github.com/elastic/elasticsearch/issues/108320
272-
- class: org.elasticsearch.xpack.esql.plugin.ClusterRequestTests
273-
method: testFallbackIndicesOptions
274-
issue: https://github.com/elastic/elasticsearch/issues/117937
275272
- class: org.elasticsearch.gradle.internal.info.BuildParameterExtensionSpec
276273
method: getBwcVersionsProvider is cached anc concurrently accessible
277274
issue: https://github.com/elastic/elasticsearch/issues/119172

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/plugin/ClusterRequestTests.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,15 +156,14 @@ protected ClusterComputeRequest mutateInstance(ClusterComputeRequest in) throws
156156

157157
public void testFallbackIndicesOptions() throws Exception {
158158
ClusterComputeRequest request = createTestInstance();
159-
var version = TransportVersionUtils.randomVersionBetween(
159+
var oldVersion = TransportVersionUtils.randomVersionBetween(
160160
random(),
161161
TransportVersions.V_8_14_0,
162162
TransportVersionUtils.getPreviousVersion(TransportVersions.ESQL_ORIGINAL_INDICES)
163163
);
164-
ClusterComputeRequest cloned = copyInstance(request, version);
164+
ClusterComputeRequest cloned = copyInstance(request, oldVersion);
165165
assertThat(cloned.clusterAlias(), equalTo(request.clusterAlias()));
166166
assertThat(cloned.sessionId(), equalTo(request.sessionId()));
167-
assertThat(cloned.configuration(), equalTo(request.configuration()));
168167
RemoteClusterPlan plan = cloned.remoteClusterPlan();
169168
assertThat(plan.plan(), equalTo(request.remoteClusterPlan().plan()));
170169
assertThat(plan.targetIndices(), equalTo(request.remoteClusterPlan().targetIndices()));

0 commit comments

Comments
 (0)