Fix test bug in ZenDiscoveryIT.
This commit is contained in:
parent
f7ef600644
commit
1c858b57c4
|
@ -90,11 +90,13 @@ public class ZenDiscoveryIT extends ESIntegTestCase {
|
|||
@Before
|
||||
public void computePrevMajorVersion() {
|
||||
Version previousMajor;
|
||||
// find a GA build whose major version is N-1
|
||||
// find a GA build whose major version is <N
|
||||
do {
|
||||
previousMajor = VersionUtils.randomVersion(random());
|
||||
} while (previousMajor.major != Version.CURRENT.major - 1
|
||||
&& (previousMajor.isAlpha() || previousMajor.isBeta() || previousMajor.isRC()));
|
||||
} while (previousMajor.onOrAfter(Version.CURRENT.minimumCompatibilityVersion())
|
||||
|| previousMajor.isAlpha()
|
||||
|| previousMajor.isBeta()
|
||||
|| previousMajor.isRC());
|
||||
previousMajorVersion = previousMajor;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue