Skip to content

Remove HLRC IndicesClient and related classes.#85492

Merged
elasticsearchmachine merged 37 commits intoelastic:masterfrom
martijnvg:remove_IndicesClient
Mar 31, 2022
Merged

Remove HLRC IndicesClient and related classes.#85492
elasticsearchmachine merged 37 commits intoelastic:masterfrom
martijnvg:remove_IndicesClient

Conversation

@martijnvg
Copy link
Copy Markdown
Member

Relates to #83423

@elasticmachine
Copy link
Copy Markdown
Collaborator

Pinging @elastic/clients-team (Team:Clients)

@martijnvg martijnvg mentioned this pull request Mar 30, 2022
66 tasks
client().performRequest(refreshRequest);
}

protected static RefreshResponse refresh(String index) throws IOException {
Copy link
Copy Markdown
Member Author

@martijnvg martijnvg Mar 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reusing server module's CreateIndexResponse, AcknowledgedResponse and RefreshResponse in tests.
These classes aren't part of the hlrc code base, but does provide us in tests the capabilities to easily parse the responses for the related apis.

Copy link
Copy Markdown
Member

@dakrone dakrone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I left one comment about duplicate helper methods

Comment on lines +2064 to +2066
protected static Map<?, ?> toMap(Response response) throws IOException {
return XContentHelper.convertToMap(XContentType.JSON.xContent(), response.getEntity().getContent(), false);
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to have the Map<?, ?> response for this? We already have the responseAsMap method in ESRestTestCase that returns a Map<String, Object>, do we need both?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I must have missed that... I replaced all custom toMap(...) methods from tests to use this one.

I will remove this one and make everything use responseAsMap(...). But first the pr ci build needs to be happy :)

@martijnvg martijnvg added the auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) label Mar 31, 2022
@elasticsearchmachine elasticsearchmachine merged commit 660d9f7 into elastic:master Mar 31, 2022
@martijnvg martijnvg deleted the remove_IndicesClient branch March 31, 2022 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) >non-issue Team:Clients Meta label for clients team v8.3.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants