Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rjernst committed Apr 16, 2019
1 parent ac7f4f3 commit 18b4733
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,7 @@ protected static String createUniqueRandomName() {

protected Settings createTestIndexSettings() {
// we have to prefer CURRENT since with the range of versions we support it's rather unlikely to get the current actually.
Version indexVersionCreated = randomBoolean() ? Version.CURRENT
: VersionUtils.randomVersionBetween(random(), Version.CURRENT.minimumIndexCompatibilityVersion(), Version.CURRENT);
Version indexVersionCreated = randomBoolean() ? Version.CURRENT : VersionUtils.randomIndexCompatibleVersion(random());
return Settings.builder()
.put(IndexMetaData.SETTING_VERSION_CREATED, indexVersionCreated)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,11 +255,4 @@ public static Version maxCompatibleVersion(Version version) {
public static Version randomIndexCompatibleVersion(Random random) {
return randomVersionBetween(random, Version.CURRENT.minimumIndexCompatibilityVersion(), Version.CURRENT);
}

/**
* Returns a random version wire compatible with the current version.
*/
public static Version randomWireCompatibleVersion(Random random) {
return randomVersionBetween(random, Version.CURRENT.minimumCompatibilityVersion(), Version.CURRENT);
}
}

0 comments on commit 18b4733

Please sign in to comment.