Skip to content
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

SmokeTestWatcherWithSecurityIT: Retry if failures searching .watcher-history #43781

Merged
merged 3 commits into from
Jul 1, 2019

Conversation

jakelandis
Copy link
Contributor

Catch exception and fail (which allows the assertBusy to retry)
if an error happens from the search against .watcher-history.

Related: #42409
Related: #39169

…history

Catch exceptions and fail (which allows the assertBusy to retry)
if an error happens from the search against .watcher-history.

Related: elastic#42409
Related: elastic#39169
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

@jakelandis
Copy link
Contributor Author

Copy link
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, left one comment (optional if you want to do it or not)

@@ -330,6 +331,10 @@ private ObjectPath getWatchHistoryEntry(String watchId, String state) throws Exc
String watchid = objectPath.evaluate("hits.hits.0._source.watch_id");
assertThat(watchid, is(watchId));
objectPathReference.set(objectPath);
} catch (ResponseException e) {
final String err = "Failed to perform search of watcher history - " + e;
logger.info(err);
Copy link
Member

Choose a reason for hiding this comment

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

Any particular reason not to use

Suggested change
logger.info(err);
logger.info("Failed to perform search of watcher history", e);

Here instead so that you get the whole stacktrace?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thanks @dakrone , I updated this and the other code (from which this came) to preserve the stack trace. e448050

@jakelandis
Copy link
Contributor Author

@elasticmachine update branch

@jakelandis jakelandis merged commit 8a4a26d into elastic:master Jul 1, 2019
jakelandis added a commit to jakelandis/elasticsearch that referenced this pull request Jul 1, 2019
…43781)

Retry if failures searching .watcher-history

Catch exceptions and fail (which allows the assertBusy to retry)
if an error happens from the search against .watcher-history.

Related: elastic#42409
Related: elastic#39169
@jakelandis
Copy link
Contributor Author

holding off on backporting since this test is currently muted in the older pipelines. Trying to stabilize this test in master before backporting.

@jpountz jpountz added v7.4.0 and removed v7.3.0 labels Jul 5, 2019
@jpountz
Copy link
Contributor

jpountz commented Jul 5, 2019

@jakelandis I bumped the version since this hasn't been backported yet.

@jakelandis
Copy link
Contributor Author

I am trying to stabilize these tests in master before backporting. I will remove the backport versions and track this via the meta issue #42409

@jakelandis jakelandis added v8.0.0-alpha1 >test Issues or PRs that are addressing/adding tests and removed v8.0.0 labels Jul 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Data Management/Watcher >test Issues or PRs that are addressing/adding tests v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants