-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Remove more usages of .watches system index. #65835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove more usages of .watches system index. #65835
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
|
Pinging @elastic/es-core-features (Team:Core/Features) |
jakelandis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I will adjust the worden and turn this into an assert.
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
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