From 63e2bac49477ac3c23f07024f4a46401da83c330 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Wed, 11 Oct 2023 16:01:24 -0700 Subject: [PATCH] simplify test --- .../org/elasticsearch/index/IndexVersionTests.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/server/src/test/java/org/elasticsearch/index/IndexVersionTests.java b/server/src/test/java/org/elasticsearch/index/IndexVersionTests.java index bfb7298d5bfca..60eb7313c71d7 100644 --- a/server/src/test/java/org/elasticsearch/index/IndexVersionTests.java +++ b/server/src/test/java/org/elasticsearch/index/IndexVersionTests.java @@ -94,7 +94,6 @@ private static String padNumber(String number) { public void testDefinedConstants() throws IllegalAccessException { Pattern historicalVersion = Pattern.compile("^V_(\\d{1,2})_(\\d{1,2})_(\\d{1,2})$"); - Pattern IndexVersion = Pattern.compile("^V_(\\d+)_(\\d{3})_(\\d{3})$"); Set ignore = Set.of("ZERO", "CURRENT", "MINIMUM_COMPATIBLE"); for (java.lang.reflect.Field field : IndexVersion.class.getFields()) { @@ -116,15 +115,6 @@ public void testDefinedConstants() throws IllegalAccessException { idString, field.get(null).toString() ); - } else if ((matcher = IndexVersion.matcher(field.getName())).matches()) { - String idString = matcher.group(1) + matcher.group(2) + matcher.group(3); - assertEquals( - "Field " + field.getName() + " does not have expected id " + idString, - idString, - field.get(null).toString() - ); - } else { - fail("Field " + field.getName() + " does not have expected format"); } } }