From 70030c18f1eb51c7b31db8657e162a5523462ac8 Mon Sep 17 00:00:00 2001 From: Jim Ferenczi Date: Fri, 24 Aug 2018 18:40:04 +0200 Subject: [PATCH] [Test] Fix sporadic failure in MembershipActionTests Rewrite test that require Version.V_5 constants. --- .../org/elasticsearch/discovery/zen/MembershipActionTests.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/test/java/org/elasticsearch/discovery/zen/MembershipActionTests.java b/server/src/test/java/org/elasticsearch/discovery/zen/MembershipActionTests.java index 3c06838593f..a6455126811 100644 --- a/server/src/test/java/org/elasticsearch/discovery/zen/MembershipActionTests.java +++ b/server/src/test/java/org/elasticsearch/discovery/zen/MembershipActionTests.java @@ -103,7 +103,7 @@ public class MembershipActionTests extends ESTestCase { } if (minNodeVersion.onOrAfter(Version.V_7_0_0_alpha1)) { - Version oldMajor = randomFrom(allVersions().stream().filter(v -> v.major < 6).collect(Collectors.toList())); + Version oldMajor = Version.V_6_4_0.minimumCompatibilityVersion(); expectThrows(IllegalStateException.class, () -> MembershipAction.ensureMajorVersionBarrier(oldMajor, minNodeVersion)); }