HDDS-10264. Allow running nested test classes in flaky-test-check #6149
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.
What changes were proposed in this pull request?
flaky-test-checkhas problems running@Nestedtests (e.g.TestLegacyReplicationManager).Setting test class name:
TestLegacyReplicationManager: no tests are runTestLegacyReplicationManager$Misreplicated: fails inprepare-jobstep, file is not found; also would require separate workflow run per nested classTestLegacyReplicationManager*: file found, tests executed OK (but twice), but artifact upload fails (artifact name includes test class name):The artifact name is not valid: ... Contains the following character: Asterisk *Changes in this PR:
junit.shcan execute tests in any moduleAbstract*$*to Surefire's test selector. In itself this will not cause any extra tests to execute, but it allows matching inherited@Nestedtests.set -xbefore runningjunit.shto log the actual command.https://issues.apache.org/jira/browse/HDDS-10264
How was this patch tested?
class = TestRootedOzoneContract, whose tests are defined as@Nestedin the abstract parent classAbstractOzoneContractTest:https://github.com/adoroszlai/ozone/actions/runs/7743208137
class = TestServiceInfoProvider$*, matches all nested tests in this concrete unit test:https://github.com/adoroszlai/ozone/actions/runs/7743319908
class = TestMiniOzoneCluster, which is a regular integration test without any nested tests:https://github.com/adoroszlai/ozone/actions/runs/7743334548
class = TestOMRatisSnapshots,method = testInstallIncrementalSnapshot, a specific method in a specific test class (without any nested tests):https://github.com/adoroszlai/ozone/actions/runs/7743350631
class = TestServiceInfoProvider$UnsecureEnvironment: all methods in a nested test class:https://github.com/adoroszlai/ozone/actions/runs/7743364840
class = TestLegacyReplicationManager$Misc,method = testGetContainerReplicaCount: specific method in a specific nested test class:https://github.com/adoroszlai/ozone/actions/runs/7743385162