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

[TEST] Check static test state after suite scoped cluster is shut down #21256

Conversation

ywelsch
Copy link
Contributor

@ywelsch ywelsch commented Nov 2, 2016

Checks on static test state are run by an @After method in ESTestCase. Suite-scoped tests in ESIntegTestCase only shut down in an @AfterClass method, which executes after the @After method in ESTestCase. The suite-scoped cluster can thus still execute actions that will violate the checks in @After without those being caught. A subsequent test executing within the same JVM will fail these checks however when @After gets called for that test.

This commit adds an explicit call to check the static test state after the suite-scoped cluster has been shut down.

@ywelsch ywelsch added >test Issues or PRs that are addressing/adding tests review labels Nov 2, 2016
Copy link
Member

@jasontedor jasontedor left a comment

Choose a reason for hiding this comment

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

LGTM.

@ywelsch ywelsch merged commit 6930a48 into elastic:master Nov 2, 2016
@ywelsch
Copy link
Contributor Author

ywelsch commented Nov 2, 2016

thanks @jasontedor

ywelsch added a commit that referenced this pull request Nov 2, 2016
#21256)

Checks on static test state are run by an @after method in ESTestCase. Suite-scoped tests in ESIntegTestCase only shut down in an @afterclass method, which executes after the @after method in ESTestCase. The suite-scoped cluster can thus still execute actions that will violate the checks in @after without those being caught. A subsequent test executing within the same JVM will fail these checks however when @after gets called for that test.

This commit adds an explicit call to check the static test state after the suite-scoped cluster has been shut down.
ywelsch added a commit that referenced this pull request Nov 2, 2016
#21256)

Checks on static test state are run by an @after method in ESTestCase. Suite-scoped tests in ESIntegTestCase only shut down in an @afterclass method, which executes after the @after method in ESTestCase. The suite-scoped cluster can thus still execute actions that will violate the checks in @after without those being caught. A subsequent test executing within the same JVM will fail these checks however when @after gets called for that test.

This commit adds an explicit call to check the static test state after the suite-scoped cluster has been shut down.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>test Issues or PRs that are addressing/adding tests v5.0.1 v5.1.1 v6.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants