Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Shivansh Arora <[email protected]>
  • Loading branch information
shiv0408 committed Jul 5, 2024
1 parent b32ddde commit 8a8f5ee
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -536,12 +536,8 @@ public void testTimeoutWhileWritingManifestFile() throws IOException {
anyList()
)
).thenReturn(new RemoteClusterStateUtils.UploadedMetadataResults());
try {
spiedService.writeFullMetadata(clusterState, randomAlphaOfLength(10));
} catch (Exception e) {
assertTrue(e instanceof RemoteStateTransferException);
assertTrue(e.getMessage().contains("Timed out waiting for transfer of manifest file to complete"));
}
RemoteStateTransferException ex = expectThrows(RemoteStateTransferException.class, () -> spiedService.writeFullMetadata(clusterState, randomAlphaOfLength(10)));
assertTrue(ex.getMessage().contains("Timed out waiting for transfer of manifest file to complete"));
}

public void testWriteFullMetadataInParallelFailureForIndexMetadata() throws IOException {
Expand Down Expand Up @@ -835,9 +831,9 @@ public void testGetClusterStateForManifest_ExcludeEphemeral() throws IOException
remoteClusterStateService.setRemoteIndexMetadataManager(mockedIndexManager);
remoteClusterStateService.setRemoteGlobalMetadataManager(mockedGlobalMetadataManager);
remoteClusterStateService.setRemoteClusterStateAttributesManager(mockedClusterStateAttributeManager);
RemoteClusterStateService mockService = spy(remoteClusterStateService);
mockService.getClusterStateForManifest(ClusterName.DEFAULT.value(), manifest, NODE_ID, false);
verify(mockService, times(1)).readClusterStateInParallel(
RemoteClusterStateService spiedService = spy(remoteClusterStateService);
spiedService.getClusterStateForManifest(ClusterName.DEFAULT.value(), manifest, NODE_ID, false);
verify(spiedService, times(1)).readClusterStateInParallel(
any(),
eq(manifest),
eq(manifest.getClusterUUID()),
Expand Down

0 comments on commit 8a8f5ee

Please sign in to comment.