Skip to content

Conversation

@adoroszlai
Copy link
Contributor

What changes were proposed in this pull request?

Speed up TestKeyDeletingService:

[INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 162.082 s - in org.apache.hadoop.ozone.om.service.TestKeyDeletingService
  1. Start OM in per-class setup methods instead of per-test. Tests are moved into two nested classes, because some of them test normal operations, others simulate failing block delete requests. Most assertions had to be changed to not assume "empty" OM DB, similarly to HDDS-10215. Speed up some tests that use OmTestManagers #6107.
  2. Reduce some service intervals.
  3. Extract some helper methods.

https://issues.apache.org/jira/browse/HDDS-10217

How was this patch tested?

Total time is reduced to 40-45 seconds:

[INFO] Running org.apache.hadoop.ozone.om.service.TestKeyDeletingService
[INFO] Running org.apache.hadoop.ozone.om.service.TestKeyDeletingService$Failing
[INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 16.812 s - in org.apache.hadoop.ozone.om.service.TestKeyDeletingService$Failing
[INFO] Running org.apache.hadoop.ozone.om.service.TestKeyDeletingService$Normal
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 22.254 s - in org.apache.hadoop.ozone.om.service.TestKeyDeletingService$Normal
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 39.151 s - in org.apache.hadoop.ozone.om.service.TestKeyDeletingService

CI:
https://github.com/adoroszlai/ozone/actions/runs/7729212630

Passed in 200 runs:
https://github.com/adoroszlai/ozone/actions/runs/7755051816

Copy link
Contributor

@smengcl smengcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @adoroszlai for refactoring this!

@adoroszlai adoroszlai merged commit 3496935 into apache:master Feb 3, 2024
@adoroszlai adoroszlai deleted the HDDS-10217 branch February 3, 2024 08:23
@adoroszlai
Copy link
Contributor Author

Thanks @smengcl for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants