Skip to content

Commit

Permalink
Fix compile after merge of #97138
Browse files Browse the repository at this point in the history
  • Loading branch information
thecoop committed Jun 28, 2023
1 parent 952f863 commit f156524
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ public void testPreventJoinClusterWithNewerIndices() {
.build();
metaBuilder.put(indexMetadata, false);
Metadata metadata = metaBuilder.build();
NodeJoinExecutor.ensureIndexCompatibility(IndexVersion.MINIMUM_COMPATIBLE, IndexVersion.CURRENT, metadata);
NodeJoinExecutor.ensureIndexCompatibility(IndexVersion.MINIMUM_COMPATIBLE, IndexVersion.current(), metadata);

expectThrows(
IllegalStateException.class,
() -> NodeJoinExecutor.ensureIndexCompatibility(
IndexVersion.MINIMUM_COMPATIBLE,
IndexVersionUtils.getPreviousVersion(IndexVersion.CURRENT),
IndexVersionUtils.getPreviousVersion(IndexVersion.current()),
metadata
)
);
Expand All @@ -108,7 +108,7 @@ public void testPreventJoinClusterWithUnsupportedIndices() {
Metadata metadata = metaBuilder.build();
expectThrows(
IllegalStateException.class,
() -> NodeJoinExecutor.ensureIndexCompatibility(IndexVersion.MINIMUM_COMPATIBLE, IndexVersion.CURRENT, metadata)
() -> NodeJoinExecutor.ensureIndexCompatibility(IndexVersion.MINIMUM_COMPATIBLE, IndexVersion.current(), metadata)
);
}

Expand Down Expand Up @@ -189,7 +189,7 @@ public void testSuccess() {
.build();
metaBuilder.put(indexMetadata, false);
Metadata metadata = metaBuilder.build();
NodeJoinExecutor.ensureIndexCompatibility(IndexVersion.MINIMUM_COMPATIBLE, IndexVersion.CURRENT, metadata);
NodeJoinExecutor.ensureIndexCompatibility(IndexVersion.MINIMUM_COMPATIBLE, IndexVersion.current(), metadata);
}

public static Settings.Builder randomCompatibleVersionSettings() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public void testIncompatibleVersion() {
)
);

indexCreated = IndexVersionUtils.randomVersionBetween(random(), minCompat, IndexVersion.CURRENT);
indexCreated = IndexVersionUtils.randomVersionBetween(random(), minCompat, IndexVersion.current());
IndexMetadata goodMeta = newIndexMeta(
"foo",
Settings.builder().put(IndexMetadata.SETTING_VERSION_CREATED, indexCreated.id()).build()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ private ClusterState createClusterState(Settings nodeSettings, Iterable<String>
for (String index : existingIndices) {
IndexMetadata mockMetadata = mock(IndexMetadata.class);
when(mockMetadata.getIndex()).thenReturn(new Index(index, index));
when(mockMetadata.getCompatibilityVersion()).thenReturn(IndexVersion.CURRENT);
when(mockMetadata.getCompatibilityVersion()).thenReturn(IndexVersion.current());
indices.put(index, mockMetadata);
}
return ClusterState.builder(new ClusterName("test"))
Expand Down

0 comments on commit f156524

Please sign in to comment.