hevinhsu opened a new pull request, #10658:
URL: https://github.com/apache/ozone/pull/10658
## What changes were proposed in this pull request?
This patch improves `TestOzoneManagerHAWithStoppedNodes` by making the
tests more deterministic and reducing unnecessary execution time.
- Replace `Thread.sleep` with state-based waiting using
`GenericTestUtils.waitFor` and `waitForLeaderToBeReady()`, removing
blind delays while preserving the original test behavior.
- Add a `setExtraClusterConfig(Consumer<OzoneConfiguration>)` hook to
`AbstractOzoneManagerHATest` so subclasses can customize the cluster
configuration before it is built.
- Use the new hook to reduce
`OZONE_BLOCK_DELETING_SERVICE_INTERVAL` from `10s` to `2s`, and reduce
the polling interval in `testKeyDeletion` from `10000ms` to `1000ms`
(timeout unchanged).
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10307
## How was this patch tested?
https://github.com/hevinhsu/ozone/actions/runs/28646244276
Test command:
```bash
mvn -pl :ozone-integration-test test \
-Dtest=TestOzoneManagerHAWithStoppedNodes \
-DskipShade -DskipRecon -DskipDocs
```
Execution time:
before:
```
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 296.8 s --
in org.apache.hadoop.ozone.om.TestOzoneManagerHAWithStoppedNodes
```
after:
```
Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 250.8 s --
in org.apache.hadoop.ozone.om.TestOzoneManagerHAWithStoppedNodes
```
--
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]