浏览代码

Modify upgrade test version check to include 8.10 (#98536)

IndexVersion hasn't yet been separated from Version. So it's ok to modify this check to allow 8.10 releases to run the test.
Simon Cooper 2 年之前
父节点
当前提交
cbec47f541

+ 6 - 2
qa/full-cluster-restart/src/javaRestTest/java/org/elasticsearch/upgrades/ParameterizedFullClusterRestartTestCase.java

@@ -24,7 +24,7 @@ import java.util.Locale;
 
 import static org.elasticsearch.upgrades.FullClusterRestartUpgradeStatus.OLD;
 import static org.elasticsearch.upgrades.FullClusterRestartUpgradeStatus.UPGRADED;
-import static org.hamcrest.Matchers.lessThan;
+import static org.hamcrest.Matchers.lessThanOrEqualTo;
 
 @TestCaseOrdering(FullClusterRestartTestOrdering.class)
 public abstract class ParameterizedFullClusterRestartTestCase extends ESRestTestCase {
@@ -85,7 +85,11 @@ public abstract class ParameterizedFullClusterRestartTestCase extends ESRestTest
         if (version.equals(org.elasticsearch.Version.CURRENT)) {
             return IndexVersion.current();
         } else {
-            assertThat("Index version needs to be added to restart test parameters", version, lessThan(org.elasticsearch.Version.V_8_10_0));
+            assertThat(
+                "Index version needs to be added to restart test parameters",
+                version,
+                lessThanOrEqualTo(org.elasticsearch.Version.V_8_10_0)
+            );
             return IndexVersion.fromId(version.id);
         }
     }