Skip to content

Commit

Permalink
Switch from ImmutableOpenMap to Map
Browse files Browse the repository at this point in the history
Signed-off-by: Maciej Mierzwa <[email protected]>
  • Loading branch information
MaciejMierzwa committed Apr 28, 2023
1 parent b98bbc5 commit ab35469
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
import org.hamcrest.TypeSafeDiagnosingMatcher;

import org.opensearch.action.admin.indices.settings.get.GetSettingsResponse;
import org.opensearch.common.collect.ImmutableOpenMap;
import org.opensearch.common.settings.Settings;

import java.util.Map;

import static java.util.Objects.isNull;

class GetSettingsResponseContainsIndicesMatcher extends TypeSafeDiagnosingMatcher<GetSettingsResponse> {
Expand All @@ -32,12 +33,12 @@ class GetSettingsResponseContainsIndicesMatcher extends TypeSafeDiagnosingMatche
@Override
protected boolean matchesSafely(GetSettingsResponse response, Description mismatchDescription) {

final ImmutableOpenMap<String, Settings> indexToSettings = response.getIndexToSettings();
final Map<String, Settings> indexToSettings = response.getIndexToSettings();
for (String index : expectedIndices) {
if (!indexToSettings.containsKey(index)) {
mismatchDescription
.appendText("Response contains settings of indices: ")
.appendValue(indexToSettings.keys());
.appendValue(indexToSettings.keySet().toArray());
return false;
}
}
Expand Down

0 comments on commit ab35469

Please sign in to comment.