Handle RejectedExecutionException for node close#49334
Merged
jaymode merged 2 commits intoelastic:masterfrom Nov 20, 2019
Merged
Handle RejectedExecutionException for node close#49334jaymode merged 2 commits intoelastic:masterfrom
jaymode merged 2 commits intoelastic:masterfrom
Conversation
This change handles the rejection of task submission in NodeTests#testCloseRaceWithTaskExecution. This test intentionally tries to cause an unexpected failure during shutdown of a node but does not handle the expected exception when the executor is shutdown before the runnable is submitted. Relates elastic#43249
Collaborator
|
Pinging @elastic/es-core-infra (:Core/Infra/Core) |
jpountz
suggested changes
Nov 19, 2019
| while (shouldRun.get()); | ||
| } catch (RejectedExecutionException e) { | ||
| assertThat(e.getMessage(), containsString("[Terminated,")); | ||
| } |
Contributor
There was a problem hiding this comment.
I think you should put the call to execute in the try block, not shouldRun.get(), which never throws rejected execution exceptions?
Member
Author
There was a problem hiding this comment.
thank you! I tried to do this too quickly and this is what I get
jpountz
approved these changes
Nov 19, 2019
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.
This change handles the rejection of task submission in
NodeTests#testCloseRaceWithTaskExecution. This test intentionally tries
to cause an unexpected failure during shutdown of a node but does not
handle the expected exception when the executor is shutdown before the
runnable is submitted.
Relates #43249