Package org.elasticsearch.test
Class VersionUtils
java.lang.Object
org.elasticsearch.test.VersionUtils
Utilities for selecting versions in tests
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns an immutable, sorted list containing all released versions.Returns an immutable, sorted list containing all unreleased versions.Returns an immutable, sorted list containing all versions, both released and unreleased.static Version
compatibleFutureVersion
(Version version) returns the first future compatible versionstatic Version
Returns the oldest releasedVersion
static Version
Returns the releasedVersion
before theVersion.CURRENT
where the minor version is less than the currents minor version.static Version
Get the released version beforeVersion.CURRENT
.static Version
getPreviousVersion
(Version version) Get the released version beforeversion
.static Version
incompatibleFutureVersion
(Version version) returns the first future incompatible versionstatic Version
maxCompatibleVersion
(Version version) Returns the maximumVersion
that is compatible with the given version.static Version
randomCompatibleVersion
(Random random, Version version) Returns a randomVersion
from all available versions, that is compatible with the given version.static Version
randomIndexCompatibleVersion
(Random random) Returns a random version index compatible with the current version.static Version
randomVersion
(Random random) Returns a randomVersion
from all available versions.static Version
randomVersionBetween
(Random random, Version minVersion, Version maxVersion)
-
Constructor Details
-
VersionUtils
public VersionUtils()
-
-
Method Details
-
allReleasedVersions
Returns an immutable, sorted list containing all released versions. -
allUnreleasedVersions
Returns an immutable, sorted list containing all unreleased versions. -
allVersions
Returns an immutable, sorted list containing all versions, both released and unreleased. -
getPreviousVersion
Get the released version beforeversion
. -
getPreviousVersion
Get the released version beforeVersion.CURRENT
. -
getPreviousMinorVersion
Returns the releasedVersion
before theVersion.CURRENT
where the minor version is less than the currents minor version. -
getFirstVersion
Returns the oldest releasedVersion
-
randomVersion
Returns a randomVersion
from all available versions. -
randomCompatibleVersion
Returns a randomVersion
from all available versions, that is compatible with the given version. -
randomVersionBetween
-
incompatibleFutureVersion
returns the first future incompatible version -
compatibleFutureVersion
returns the first future compatible version -
maxCompatibleVersion
Returns the maximumVersion
that is compatible with the given version. -
randomIndexCompatibleVersion
Returns a random version index compatible with the current version.
-