Skip to content

Commit

Permalink
Fix plugin compilation (opensearch-project#1580)
Browse files Browse the repository at this point in the history
* Changed gradle version and removed values iterator

Signed-off-by: Guian Gumpac <[email protected]>

* Update a test to match new indexResponse.aliases() type.

Signed-off-by: MaxKsyunz <[email protected]>

* Ran ./gradlew wrapper

Signed-off-by: Guian Gumpac <[email protected]>

---------

Signed-off-by: Guian Gumpac <[email protected]>
Signed-off-by: MaxKsyunz <[email protected]>
Co-authored-by: MaxKsyunz <[email protected]>
Signed-off-by: Yury-Fridlyand <[email protected]>
  • Loading branch information
Yury-Fridlyand and MaxKsyunz committed Jun 27, 2023
1 parent 8558e90 commit 6fe6c45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public List<String> indices() {
.setLocal(true)
.get();
final Stream<String> aliasStream =
ImmutableList.copyOf(indexResponse.aliases().valuesIt()).stream()
ImmutableList.copyOf(indexResponse.aliases().values()).stream()
.flatMap(Collection::stream).map(AliasMetadata::alias);

return Stream.concat(Arrays.stream(indexResponse.getIndices()), aliasStream)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,7 @@ void cleanup_rethrows_exception() {
@Test
void get_indices() {
AliasMetadata aliasMetadata = mock(AliasMetadata.class);
ImmutableOpenMap.Builder<String, List<AliasMetadata>> builder = ImmutableOpenMap.builder();
builder.fPut("index", Arrays.asList(aliasMetadata));
final ImmutableOpenMap<String, List<AliasMetadata>> openMap = builder.build();
final var openMap = Map.of("index", List.of(aliasMetadata));
when(aliasMetadata.alias()).thenReturn("index_alias");
when(nodeClient.admin().indices()
.prepareGetIndex()
Expand Down

0 comments on commit 6fe6c45

Please sign in to comment.