Merge pull request #16232 from s1monw/use_version_id_in_settings
Use Version#id to parse version from settings.
This commit is contained in:
commit
9cb9bdb736
|
@ -61,7 +61,7 @@ public class DateHistogramOffsetIT extends ESIntegTestCase {
|
|||
protected Settings nodeSettings(int nodeOrdinal) {
|
||||
return Settings.builder()
|
||||
.put(super.nodeSettings(nodeOrdinal))
|
||||
.put(AssertingLocalTransport.ASSERTING_TRANSPORT_MIN_VERSION_KEY.getKey(), Version.V_1_4_0_Beta1.toString()).build();
|
||||
.put(AssertingLocalTransport.ASSERTING_TRANSPORT_MIN_VERSION_KEY.getKey(), Version.V_1_4_0_Beta1).build();
|
||||
}
|
||||
|
||||
@Before
|
||||
|
|
|
@ -62,9 +62,9 @@ public class AssertingLocalTransport extends LocalTransport {
|
|||
}
|
||||
|
||||
public static final Setting<Version> ASSERTING_TRANSPORT_MIN_VERSION_KEY = new Setting<>("transport.asserting.version.min",
|
||||
Version.CURRENT.minimumCompatibilityVersion().toString(), Version::fromString, false, Setting.Scope.CLUSTER);
|
||||
Integer.toString(Version.CURRENT.minimumCompatibilityVersion().id), (s) -> Version.fromId(Integer.parseInt(s)), false, Setting.Scope.CLUSTER);
|
||||
public static final Setting<Version> ASSERTING_TRANSPORT_MAX_VERSION_KEY = new Setting<>("transport.asserting.version.max",
|
||||
Version.CURRENT.toString(), Version::fromString, false, Setting.Scope.CLUSTER);
|
||||
Integer.toString(Version.CURRENT.id), (s) -> Version.fromId(Integer.parseInt(s)), false, Setting.Scope.CLUSTER);
|
||||
private final Random random;
|
||||
private final Version minVersion;
|
||||
private final Version maxVersion;
|
||||
|
|
Loading…
Reference in New Issue