Package org.elasticsearch.test
Class VersionUtils
java.lang.Object
org.elasticsearch.test.VersionUtils
Utilities for selecting versions in tests
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic NavigableSet<Version> Returns an immutable, sorted list containing all versions, both released and unreleased.static VersionReturns the oldestVersionstatic VersionReturns theVersionbefore theVersion.CURRENTwhere the minor version is less than the currents minor version.static VersionGet the released version beforeVersion.CURRENT.static VersiongetPreviousVersion(Version version) Get the version beforeversion.static VersionmaxCompatibleVersion(Version version) Returns the maximumVersionthat is compatible with the given version.static VersionrandomCompatibleVersion(Random random, Version version) Returns a randomVersionfrom all available versions, that is compatible with the given version.static <T extends VersionId<T>>
TrandomFrom(Random random, NavigableSet<T> set) static VersionrandomVersion(Random random) Returns a randomVersionfrom all available versions.static VersionrandomVersionBetween(Random random, Version minVersion, Version maxVersion)
-
Constructor Details
-
VersionUtils
public VersionUtils()
-
-
Method Details
-
allVersions
Returns an immutable, sorted list containing all versions, both released and unreleased. -
getPreviousVersion
Get the version beforeversion. -
getPreviousVersion
Get the released version beforeVersion.CURRENT. -
getPreviousMinorVersion
Returns theVersionbefore theVersion.CURRENTwhere the minor version is less than the currents minor version. -
getFirstVersion
Returns the oldestVersion -
randomVersion
Returns a randomVersionfrom all available versions. -
randomCompatibleVersion
Returns a randomVersionfrom all available versions, that is compatible with the given version. -
randomVersionBetween
-
maxCompatibleVersion
Returns the maximumVersionthat is compatible with the given version.
-