adoroszlai opened a new pull request, #5375: URL: https://github.com/apache/ozone/pull/5375
## What changes were proposed in this pull request? Sometimes we would like to run JUnit tests ignoring any timeouts. One way to achieve this is to wrap the timeout setting in comments, but it is tedious. JUnit5 timeout can be disabled simply by passing `-Djunit.jupiter.execution.timeout.mode=disabled` to Maven. In the long run all tests should be upgraded to JUnit5. In the meantime, the goal of this change is to make JUnit4 timeouts conditional on the same property. https://issues.apache.org/jira/browse/HDDS-9361 ## How was this patch tested? Temporarily changed one of the timeouts to 1 second. Ran the test normally: ``` $ mvn -am -pl :hdds-container-service -Dtest=TestKeyValueHandler clean test ... [ERROR] Tests run: 8, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.913 s <<< FAILURE! - in org.apache.hadoop.ozone.container.keyvalue.TestKeyValueHandler [ERROR] TestKeyValueHandler.testVolumeSetInKeyValueHandler Time elapsed: 1.01 s <<< ERROR! org.junit.runners.model.TestTimedOutException: test timed out after 1 seconds ... ``` and with timeouts disabled: ``` $ mvn -am -pl :hdds-container-service -Dtest=TestKeyValueHandler -Djunit.jupiter.execution.timeout.mode=disabled clean test ... [INFO] Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.056 s - in org.apache.hadoop.ozone.container.keyvalue.TestKeyValueHandler ... ``` CI: https://github.com/adoroszlai/hadoop-ozone/actions/runs/6341338295 -- 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]
