Skip to content

Commit 0861046

Browse files
authored
[Tests] Fix index compatibility checks for AArch64 (#127052)
1 parent 6ee5bcf commit 0861046

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

test/framework/src/test/java/org/elasticsearch/test/index/IndexVersionUtilsTests.java

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,19 @@ public void testIndexCompatibleVersionMatches() {
3030

3131
String minIndexVersion = IndexVersions.MINIMUM_COMPATIBLE.toReleaseVersion();
3232
String lowestCompatibleVersion = indexCompatible.released.get(0);
33-
assertThat(lowestCompatibleVersion, equalTo(minIndexVersion));
33+
34+
var arch = System.getProperty("os.arch");
35+
var osName = System.getProperty("os.name");
36+
37+
if (arch.equals("aarch64") && osName.startsWith("Mac") && minIndexVersion.startsWith("7.0")) {
38+
// AArch64 is supported on Mac since 7.16.0
39+
assertThat(lowestCompatibleVersion, equalTo("7.16.0"));
40+
} else if (arch.equals("aarch64") && osName.startsWith("Linux") && minIndexVersion.startsWith("7.0")) {
41+
// AArch64 is supported on Linux since 7.12.0
42+
assertThat(lowestCompatibleVersion, equalTo("7.12.0"));
43+
} else {
44+
assertThat(lowestCompatibleVersion, equalTo(minIndexVersion));
45+
}
3446
}
3547

3648
/**

0 commit comments

Comments
 (0)