adoroszlai opened a new pull request, #6149:
URL: https://github.com/apache/ozone/pull/6149

   ## What changes were proposed in this pull request?
   
   `flaky-test-check` has problems running `@Nested` tests (e.g. 
`TestLegacyReplicationManager`).
   
   Setting test class name:
   
    * `TestLegacyReplicationManager`: no tests are run
    * `TestLegacyReplicationManager$Misreplicated`: fails in `prepare-job` 
step, file is not found; also would require separate workflow run per nested 
class
    * `TestLegacyReplicationManager*`: 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:
   
   1. Remove the step that required the test class to be defined in a similarly 
named file.
      * `junit.sh` can execute tests in any module
      * misspelled test class results in failed run (implemented in HDDS-10080)
   2. Avoid using test class in the artifact name.  Instead it now includes the 
run id (e.g. 7743208137), which can be used to look up the run in Github.  
Since runs can be repeated, it also includes the run number (e.g. 187) to make 
it unique.
   3. Add `Abstract*$*` to Surefire's test selector.  In itself this will not 
cause any extra tests to execute, but it allows matching inherited `@Nested` 
tests.
   4. Add `set -x` before running `junit.sh` to log the actual command.
   5. (not required) Bump default number of splits to 10.  Usually some 
multiple of 10x10 tests are run, because it helps define failure rate in 
percents.
   
   https://issues.apache.org/jira/browse/HDDS-10264
   
   ## How was this patch tested?
   
   `class = TestRootedOzoneContract`, whose tests are defined as `@Nested` in 
the abstract parent class `AbstractOzoneContractTest`:
   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


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to