Skip to content

Comments

Ensure threads running before closing node#43240

Merged
jaymode merged 1 commit intoelastic:masterfrom
jaymode:nodes_tests_close_fix
Jun 14, 2019
Merged

Ensure threads running before closing node#43240
jaymode merged 1 commit intoelastic:masterfrom
jaymode:nodes_tests_close_fix

Conversation

@jaymode
Copy link
Member

@jaymode jaymode commented Jun 14, 2019

There are a few tests within NodeTests that submit items to the
threadpool and then close the node. The tests are designed to check
how running tasks are affected during node close. These tests can cause
CI failures since the submitted tasks may not be running when the node
is closed and then execute after the thread context is closed, which
triggers an unexpected exception. This change ensures the threads are
running so we avoid the unexpected exception and can test these cases.

The test of task submittal while a node is closing is also important so
an additional but muted test has been added that tests the case where a
task may be getting submitted while the node is closing and ensuring we
do not trigger anything unexpected in these cases.

Relates #42774
Relates #42577

There are a few tests within NodeTests that submit items to the
threadpool and then close the node. The tests are designed to check
how running tasks are affected during node close. These tests can cause
CI failures since the submitted tasks may not be running when the node
is closed and then execute after the thread context is closed, which
triggers an unexpected exception. This change ensures the threads are
running so we avoid the unexpected exception and can test these cases.

The test of task submittal while a node is closing is also important so
an additional but muted test has been added that tests the case where a
task may be getting submitted while the node is closing and ensuring we
do not trigger anything unexpected in these cases.

Relates elastic#42774
Relates elastic#42577
@jaymode jaymode added >test Issues or PRs that are addressing/adding tests :Core/Infra/Core Core issues without another label v8.0.0 v7.3.0 labels Jun 14, 2019
@jaymode jaymode requested a review from jpountz June 14, 2019 15:37
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra

@jaymode jaymode merged commit 7870ae2 into elastic:master Jun 14, 2019
jaymode added a commit that referenced this pull request Jun 14, 2019
There are a few tests within NodeTests that submit items to the
threadpool and then close the node. The tests are designed to check
how running tasks are affected during node close. These tests can cause
CI failures since the submitted tasks may not be running when the node
is closed and then execute after the thread context is closed, which
triggers an unexpected exception. This change ensures the threads are
running so we avoid the unexpected exception and can test these cases.

The test of task submittal while a node is closing is also important so
an additional but muted test has been added that tests the case where a
task may be getting submitted while the node is closing and ensuring we
do not trigger anything unexpected in these cases.

Relates #42774
Relates #42577
@jaymode jaymode deleted the nodes_tests_close_fix branch June 14, 2019 18:44
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 v7.3.0 v8.0.0-alpha1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants