Grant Henke has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/17307 )
Change subject: [test] Fix handling of assume statements in Java RetryRule ...................................................................... [test] Fix handling of assume statements in Java RetryRule The java RetryRule did not treat the AssumptionViolatedException thrown by the various assume statements in Junit correctly. This can result in test failures which should actually be skipped tests and in the case of the flaky test reporting can result in reporting failed tests which were actually skipped. This patch adjusts the handling of the AssumptionViolatedException to skip the test correctly and mark the test as a success when reporting given there is no “skipped” result we can report to dist-test. I used the JUnit TestWatcher rule which I used for reference: https://github.com/junit-team/junit4/blob/main/src/main/java/org/junit/rules/TestWatcher.java#L63-L65 Change-Id: I638f56c8e21ed7c57ee576cbc23332e676dba7cf Reviewed-on: http://gerrit.cloudera.org:8080/17307 Reviewed-by: Alexey Serbin <[email protected]> Tested-by: Grant Henke <[email protected]> --- M java/kudu-test-utils/src/main/java/org/apache/kudu/test/junit/RetryRule.java M java/kudu-test-utils/src/test/java/org/apache/kudu/test/junit/TestRetryRule.java 2 files changed, 21 insertions(+), 0 deletions(-) Approvals: Alexey Serbin: Looks good to me, approved Grant Henke: Verified -- To view, visit http://gerrit.cloudera.org:8080/17307 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I638f56c8e21ed7c57ee576cbc23332e676dba7cf Gerrit-Change-Number: 17307 Gerrit-PatchSet: 4 Gerrit-Owner: Grant Henke <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Grant Henke <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120)
