Skip to content

Conversation

@martijnvg
Copy link
Member

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

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 martijnvg added >test Issues or PRs that are addressing/adding tests :Data Management/Watcher v8.0.0 v7.11.0 labels Dec 3, 2020
@martijnvg martijnvg requested a review from jakelandis December 3, 2020 17:03
@elasticmachine elasticmachine added the Team:Data Management Meta label for data/management team label Dec 3, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features (Team:Core/Features)

Copy link
Contributor

@jakelandis jakelandis left a 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));
Copy link
Contributor

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 ?

Copy link
Member Author

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.

@martijnvg martijnvg merged commit 4e7adad into elastic:master Dec 4, 2020
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
Backporting #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 #62501
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Data Management/Watcher Team:Data Management Meta label for data/management team >test Issues or PRs that are addressing/adding tests v7.11.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants