Skip to content

Conversation

@snoopcheri
Copy link
Member

This PR adds special handling when Gradle 5.0 is used.

At the end of each round, entries for test classes w/o test methods from previousRoundFailedTests, when using Gradle 5.0. For Gradle 5.1 and above this would automatically happen, as Gradle also reports events for intermediate classes, when JUnit's suite engine is used or when test classes are @nested.

To be on the safe side, we're only removing entries for test classes, if we observed this test class during the current round. It's not a perfect solution but allows using the class-retry feature of the Test Retry Gradle plugin together with test suites and nested class for Gradle 5.0 as well.

Fixes #230

When using Gradle 5.0 in combination with JUnit's suite runner
or when using @nested test classes, we lack test events for the
intermediate classes.

This leads to a problem when an intermediate class is configured
for class-level retry.

In order to fix this, we manually remove specific entries from
the failed tests at the end of a round. But we only do this
for Gradle 5.0, as test reporting for newer version does not
exhibit this problem.

Signed-off-by: Daniel Clausen <[email protected]>
…sses

Verification for Gradle 5.0 adjusted.

Signed-off-by: Daniel Clausen <[email protected]>
@snoopcheri snoopcheri requested review from a team and pshevche November 1, 2023 12:58
@snoopcheri snoopcheri self-assigned this Nov 1, 2023
@snoopcheri snoopcheri requested a review from pshevche November 2, 2023 08:53
@snoopcheri snoopcheri merged commit 2354682 into main Nov 3, 2023
@snoopcheri snoopcheri deleted the snoopcheri/fix-class-level-retry-with-gradle-5 branch November 3, 2023 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test retry on class level fails with suite engine and Gradle 5.0

3 participants