adoroszlai opened a new pull request, #6107: URL: https://github.com/apache/ozone/pull/6107
## What changes were proposed in this pull request? Some of the slowest unit tests use `OmTestManagers` to launch OM. It takes ~10 seconds to initialize (half of that is Ratis leader election). The test cases are pretty quick after that. ``` [INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 148.9 s -- in org.apache.hadoop.ozone.om.service.TestOpenKeyCleanupService [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 133.0 s -- in org.apache.hadoop.ozone.om.TestBucketManagerImpl [INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 108.3 s -- in org.apache.hadoop.ozone.om.TestKeyManagerUnit [INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 83.42 s -- in org.apache.hadoop.ozone.om.TestOmSnapshotManager ``` This change speeds up four of these tests, mostly by converting per-method setup to per-class, to reduce the overhead. Also, wait for OM leader election before proceeding with the test, to avoid an exception related to failover retry while trying to create the RPC client. Use test method name as volume name to avoid conflicts, and unexpected number of buckets/keys. Some of the assertions need to be tweaked to account for objects left over and operations performed by other test cases. https://issues.apache.org/jira/browse/HDDS-10215 ## How was this patch tested? ``` [INFO] Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 20.262 s - in org.apache.hadoop.ozone.om.service.TestOpenKeyCleanupService [INFO] Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.457 s - in org.apache.hadoop.ozone.om.TestBucketManagerImpl [INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 15.444 s - in org.apache.hadoop.ozone.om.TestKeyManagerUnit [INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.75 s - in org.apache.hadoop.ozone.om.TestOmSnapshotManager ``` https://github.com/adoroszlai/ozone/actions/runs/7670459056/job/20907076486 -- 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]
