Skip to content

Commit 27d56f8

Browse files
committed
Remove obsolete expectations
DENSE_VECTOR is completely unsupported on 9.1, no need to check for this version and adjust expectations.
1 parent 11de8ec commit 27d56f8

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/AllSupportedFieldsTestCase.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
* load constant field values and have simple mappings.
7878
*/
7979
public class AllSupportedFieldsTestCase extends ESRestTestCase {
80-
private static final Logger logger = LogManager.getLogger(FieldExtractorTestCase.class);
8180

8281
@Rule(order = Integer.MIN_VALUE)
8382
public ProfileLogger profileLogger = new ProfileLogger();
@@ -223,7 +222,7 @@ public void createIndices() throws IOException {
223222
* Make sure the test doesn't run on snapshot builds. Release builds only.
224223
* <p>
225224
* {@link Build#isSnapshot()} checks if the version under test is a snapshot.
226-
* But! This run test runs against many versions and if *any* are snapshots
225+
* But! This test runs against many versions and if *any* are snapshots
227226
* then this will fail. So we check the versions of each node in the cluster too.
228227
* </p>
229228
*/
@@ -347,7 +346,7 @@ public final void testFetchDenseVector() throws IOException {
347346
String indexName = e.getKey();
348347
NodeInfo nodeInfo = e.getValue();
349348
MapMatcher expectedValues = matchesMap();
350-
expectedValues = expectedValues.entry("f_dense_vector", expectedDenseVector(nodeInfo.version));
349+
expectedValues = expectedValues.entry("f_dense_vector", matchesList().item(0.5).item(10.0).item(5.9999995));
351350
expectedValues = expectedValues.entry("_index", indexName);
352351
expectedAllValues = expectedAllValues.entry(indexName, expectedValues);
353352
}
@@ -412,7 +411,6 @@ public final void testFetchAggregateMetricDouble() throws IOException {
412411
MapMatcher expectedAllValues = matchesMap();
413412
for (Map.Entry<String, NodeInfo> e : expectedIndices().entrySet()) {
414413
String indexName = e.getKey();
415-
NodeInfo nodeInfo = e.getValue();
416414
MapMatcher expectedValues = matchesMap();
417415
expectedValues = expectedValues.entry(
418416
"f_aggregate_metric_double",
@@ -651,12 +649,6 @@ private Matcher<?> expectedValue(DataType type, TransportVersion coordinatorVers
651649
};
652650
}
653651

654-
private Matcher<List<?>> expectedDenseVector(TransportVersion version) {
655-
return version.supports(INDEX_SOURCE) // *after* 9.1
656-
? matchesList().item(0.5).item(10.0).item(5.9999995)
657-
: matchesList().item(0.04283529).item(0.85670584).item(0.5140235);
658-
}
659-
660652
/**
661653
* Is the type supported in indices?
662654
*/

0 commit comments

Comments
 (0)