Forbid usage of static inner test classes in TestNG#11316
Merged
hashhar merged 2 commits intotrinodb:masterfrom Mar 16, 2022
Merged
Forbid usage of static inner test classes in TestNG#11316hashhar merged 2 commits intotrinodb:masterfrom
hashhar merged 2 commits intotrinodb:masterfrom
Conversation
56cca63 to
d2985c6
Compare
findepi
reviewed
Mar 4, 2022
Member
There was a problem hiding this comment.
static boolean isInnerClass(Class<?> testClas)
findepi
reviewed
Mar 4, 2022
Member
There was a problem hiding this comment.
Remove "Static", it doesn't matter.
findepi
reviewed
Mar 4, 2022
Comment on lines
24
to
38
Member
There was a problem hiding this comment.
The tested method is one-liner "is inner class". I don't think this test adds any value.
Contributor
Author
There was a problem hiding this comment.
I wanted to prove to myself the automation works, I can remove the MultipleInnerTestClasses cases but I think keeping at least the first testcase is helpful.
Member
There was a problem hiding this comment.
if/once you apply https://github.com/trinodb/trino/pull/11316/files#r819513710, there is nothing this test actually tests.
d2985c6 to
d0630d1
Compare
hashhar
approved these changes
Mar 14, 2022
aa8893c to
689bdb5
Compare
TestNG support for inner test classes is poor, see this issue: trinodb#11185
689bdb5 to
1dc1814
Compare
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.
Description
TestNG support for static inner test classes is poor
Adds a TestNG listener to fail if a test class is defined as a static inner class
Related issues, pull requests, and links
This PR introduced usage of static inner test classes in kudu:
#10940
This PR subsequently removed the static inner test classes after some tests were not being run:
#11185
Documentation
(X) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.
Release notes
(X) No release notes entries required.
( ) Release notes entries required with the following suggested text: