Skip to content

Commit

Permalink
Fix Unit test after remove state enabled assertion
Browse files Browse the repository at this point in the history
Signed-off-by: Sooraj Sinha <[email protected]>
  • Loading branch information
soosinha committed Aug 31, 2023
1 parent 42af4dd commit a07486b
Showing 1 changed file with 8 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,15 @@ public void testFailWriteFullMetadataNonClusterManagerNode() throws IOException
Assert.assertThat(manifest, nullValue());
}

public void testFailWriteFullMetadataWhenRemoteStateDisabled() throws IOException {
public void testFailInitializationWhenRemoteStateDisabled() throws IOException {
final Settings settings = Settings.builder().build();
remoteClusterStateService = spy(
new RemoteClusterStateService(
"test-node-id",
repositoriesServiceSupplier,
settings,
new ClusterSettings(settings, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS),
() -> 0L
)
);
final ClusterState clusterState = generateClusterStateWithOneIndex().nodes(nodesWithLocalNodeClusterManager()).build();
assertThrows(AssertionError.class, () -> remoteClusterStateService.writeFullMetadata(clusterState));
assertThrows(AssertionError.class, () -> new RemoteClusterStateService(
"test-node-id",
repositoriesServiceSupplier,
settings,
new ClusterSettings(settings, ClusterSettings.BUILT_IN_CLUSTER_SETTINGS),
() -> 0L
));
}

public void testFailWriteFullMetadataWhenRepositoryNotSet() {
Expand Down

0 comments on commit a07486b

Please sign in to comment.