Remove more usages of .watches system index.#65835
Merged
martijnvg merged 4 commits intoelastic:masterfrom Dec 4, 2020
Merged
Conversation
Make use of the new query watches api to simply list watches or to delete all watches using the delete watch api. Relates to elastic#62501
Collaborator
|
Pinging @elastic/es-core-features (Team:Core/Features) |
38 tasks
jakelandis
approved these changes
Dec 3, 2020
Contributor
jakelandis
left a comment
There was a problem hiding this comment.
LGTM , thanks for consolidating some of this code too!
| ESRestTestCase.adminClient().performRequest(deleteWatchesIndexRequest); | ||
| int totalCount = response.evaluate("count"); | ||
| List<Map<?, ?>> watches = response.evaluate("watches"); | ||
| assertThat("Less watches requested than exist in total", watches.size(), equalTo(totalCount)); |
Contributor
There was a problem hiding this comment.
nit: I assume this would be a programmers error, if so can this just be a Java assert instead of an assertThat to help differentiate between something that is being tested and a self documenting sanity check. Also, why Less ? should be it be not equal ?
Member
Author
There was a problem hiding this comment.
Right, I will adjust the worden and turn this into an assert.
martijnvg
added a commit
to martijnvg/elasticsearch
that referenced
this pull request
Dec 4, 2020
Backporting elastic#65835 to 7.x branch. Make use of the new query watches api to simply list watches or to delete all watches using the delete watch api. Relates to elastic#62501
martijnvg
added a commit
that referenced
this pull request
Dec 4, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Make use of the new query watches api to simply list watches or
to delete all watches using the delete watch api.
Relates to #62501