Skip to content

Commit

Permalink
Rename map variable to match its content
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Widdis <widdis@gmail.com>
  • Loading branch information
dbwiddis committed Nov 8, 2023
1 parent 9148977 commit 4e63a2a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class IndexMappingToolTests {
@Mock
private GetIndexResponse getIndexResponse;

private Map<String, String> indicesParams;
private Map<String, String> indexParams;
private Map<String, String> otherParams;
private Map<String, String> emptyParams;

Expand All @@ -63,7 +63,7 @@ public void setup() {

IndexMappingTool.Factory.getInstance().init(client);

indicesParams = Map.of("index", "[\"foo\"]");
indexParams = Map.of("index", "[\"foo\"]");
otherParams = Map.of("other", "[\"bar\"]");
emptyParams = Collections.emptyMap();
}
Expand Down Expand Up @@ -105,7 +105,7 @@ public void testRunAsyncNoResults() throws Exception {

when(getIndexResponse.indices()).thenReturn(Strings.EMPTY_ARRAY);

tool.run(indicesParams, listener);
tool.run(indexParams, listener);
actionListenerCaptor.getValue().onResponse(getIndexResponse);

future.join();
Expand Down Expand Up @@ -153,7 +153,7 @@ public void testRunAsyncIndexMapping() throws Exception {
final CompletableFuture<String> future = new CompletableFuture<>();
ActionListener<String> listener = ActionListener.wrap(r -> { future.complete(r); }, e -> { future.completeExceptionally(e); });

tool.run(indicesParams, listener);
tool.run(indexParams, listener);
actionListenerCaptor.getValue().onResponse(getIndexResponse);

future.orTimeout(10, TimeUnit.SECONDS).join();
Expand All @@ -178,7 +178,7 @@ public void testRunAsyncIndexMapping() throws Exception {
public void testTool() {
Tool tool = IndexMappingTool.Factory.getInstance().create(Collections.emptyMap());
assertEquals(IndexMappingTool.NAME, tool.getName());
assertTrue(tool.validate(indicesParams));
assertTrue(tool.validate(indexParams));
assertTrue(tool.validate(otherParams));
assertFalse(tool.validate(emptyParams));
}
Expand Down

0 comments on commit 4e63a2a

Please sign in to comment.