Skip to content

Conversation

@jaymode
Copy link
Member

@jaymode jaymode commented Nov 19, 2019

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

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
@jaymode jaymode added >test Issues or PRs that are addressing/adding tests :Core/Infra/Core Core issues without another label v8.0.0 labels Nov 19, 2019
@jaymode jaymode requested a review from jpountz November 19, 2019 20:14
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (:Core/Infra/Core)

while (shouldRun.get());
} catch (RejectedExecutionException e) {
assertThat(e.getMessage(), containsString("[Terminated,"));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you should put the call to execute in the try block, not shouldRun.get(), which never throws rejected execution exceptions?

Copy link
Member Author

Choose a reason for hiding this comment

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

thank you! I tried to do this too quickly and this is what I get

@jaymode jaymode merged commit 39d298f into elastic:master Nov 20, 2019
@jaymode jaymode deleted the nodes_tests_handle_ree branch November 20, 2019 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Core/Infra/Core Core issues without another label >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