Skip to content

Commit

Permalink
fix UT
Browse files Browse the repository at this point in the history
Signed-off-by: bansvaru <[email protected]>
  • Loading branch information
linuxpi committed Oct 17, 2023
1 parent 41e993e commit 99467c5
Showing 1 changed file with 12 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -956,15 +956,17 @@ public void testGatewayForRemoteStateForInitialBootstrapBlocksApplied() throws I
.numberOfReplicas(1)
.build();

final ClusterState clusterState = createClusterState(
randomNonNegativeLong(),
Metadata.builder()
.coordinationMetadata(CoordinationMetadata.builder().term(randomLong()).build())
.put(indexMetadata, false)
.clusterUUID(ClusterState.UNKNOWN_UUID)
.persistentSettings(Settings.builder().put(Metadata.SETTING_READ_ONLY_SETTING.getKey(), true).build())
.build()
);
final ClusterState clusterState = ClusterState.builder(
createClusterState(
randomNonNegativeLong(),
Metadata.builder()
.coordinationMetadata(CoordinationMetadata.builder().term(randomLong()).build())
.put(indexMetadata, false)
.clusterUUID(ClusterState.UNKNOWN_UUID)
.persistentSettings(Settings.builder().put(Metadata.SETTING_READ_ONLY_SETTING.getKey(), true).build())
.build()
)
).nodes(DiscoveryNodes.EMPTY_NODES).build();

final RemoteStoreRestoreService remoteStoreRestoreService = mock(RemoteStoreRestoreService.class);
when(remoteStoreRestoreService.restore(any(), any(), anyBoolean(), any())).thenReturn(
Expand All @@ -975,7 +977,7 @@ public void testGatewayForRemoteStateForInitialBootstrapBlocksApplied() throws I
remoteClusterStateService,
remoteStoreRestoreService,
persistedStateRegistry,
clusterState,
ClusterState.EMPTY_STATE,
true
);
PersistedState remotePersistedState = persistedStateRegistry.getPersistedState(PersistedStateType.REMOTE);
Expand Down

0 comments on commit 99467c5

Please sign in to comment.