Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: bansvaru <bansvaru@amazon.com>
  • Loading branch information
linuxpi committed Sep 13, 2023
1 parent a50d1d2 commit a0f4a86
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ public Optional<ClusterMetadataManifest> getLatestClusterMetadataManifest(String
*/
public String getLastKnownUUIDFromRemote(String clusterName) {
try {
Set<String> clusterUUIDs = Collections.unmodifiableSet(getAllClusterUUIDs(clusterName));
Set<String> clusterUUIDs = getAllClusterUUIDs(clusterName);
Map<String, ClusterMetadataManifest> latestManifests = getLatestManifestForAllClusterUUIDs(clusterName, clusterUUIDs);
List<String> validChain = createClusterChain(latestManifests);
if (validChain.isEmpty()) {
Expand All @@ -606,7 +606,7 @@ private Set<String> getAllClusterUUIDs(String clusterName) throws IOException {
if (clusterUUIDMetadata == null) {
return Collections.emptySet();
}
return clusterUUIDMetadata.keySet();
return Collections.unmodifiableSet(clusterUUIDMetadata.keySet());
}

private Map<String, ClusterMetadataManifest> getLatestManifestForAllClusterUUIDs(String clusterName, Set<String> clusterUUIDs) {
Expand Down Expand Up @@ -756,7 +756,7 @@ public void deleteStaleClusterUUID(ClusterState clusterState, ClusterMetadataMan
String clusterName = clusterState.getClusterName().value();
Set<String> allClustersUUIDsInRemote = null;
try {
allClustersUUIDsInRemote = getAllClusterUUIDs(clusterState.getClusterName().value());
allClustersUUIDsInRemote = new HashSet<>(getAllClusterUUIDs(clusterState.getClusterName().value()));
} catch (IOException e) {
throw new RuntimeException(e);
}
Expand Down

0 comments on commit a0f4a86

Please sign in to comment.