Browse Source

Mute test for issue 94239 (#94365)

* Allow skip-all to work with other ranges

When muting tests that already have version ranges set in the skip
section, it is convenient to remember the previous ranges for when
we later un-mute.

* Mute test that fails 1% of the time (#94239)

* Remember previous versions in test skip.version
Craig Taverner 2 years ago
parent
commit
1bd5ad97c8

+ 2 - 2
rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/tsdb/20_mapping.yml

@@ -539,8 +539,8 @@ source include/exclude:
 ---
 Unsupported metric type position:
   - skip:
-      version: " - 8.0.99, 8.8.0 - "
-      reason: index.mode and routing_path introduced in 8.1.0 and time series metric position introduced in 8.8.0
+      version: "all, - 8.0.99, 8.8.0 -"
+      reason: AwaitsFix https://github.com/elastic/elasticsearch/issues/94239, index.mode and routing_path introduced in 8.1.0 and time series metric position introduced in 8.8.0
 
   - do:
       catch: '/unknown parameter \[time_series_metric\] on mapper \[location\] of type \[geo_point\]/'

+ 3 - 3
test/yaml-rest-runner/src/main/java/org/elasticsearch/test/rest/yaml/section/SkipSection.java

@@ -174,12 +174,12 @@ public class SkipSection {
         if (rawRanges == null) {
             return Collections.singletonList(new VersionRange(null, null));
         }
-        if (rawRanges.trim().equals("all")) {
-            return Collections.singletonList(new VersionRange(VersionUtils.getFirstVersion(), Version.CURRENT));
-        }
         String[] ranges = rawRanges.split(",");
         List<VersionRange> versionRanges = new ArrayList<>();
         for (String rawRange : ranges) {
+            if (rawRange.trim().equals("all")) {
+                return Collections.singletonList(new VersionRange(VersionUtils.getFirstVersion(), Version.CURRENT));
+            }
             String[] skipVersions = rawRange.split("-", -1);
             if (skipVersions.length > 2) {
                 throw new IllegalArgumentException("version range malformed: " + rawRanges);