Skip to content

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

Merged
ywelsch merged 1 commit intoelastic:masterfrom
ywelsch:fix/check-static-state-after-suite-cluster-shutdown
Nov 2, 2016
Merged

[TEST] Check static test state after suite scoped cluster is shut down#21256
ywelsch merged 1 commit intoelastic:masterfrom
ywelsch:fix/check-static-state-after-suite-cluster-shutdown

Conversation

@ywelsch
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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