-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue with test event not being generated #297
Conversation
Blocked until #296 is merged. The test will likely have to go away as the sample won't result in unretried tests anymore. I am not sure how to reproduce it otherwise, though. |
One thing that might work would be a JUnit Jupiter parameterized test with a Another option would be to turn it into a unit test and recreate the failure that way, but the behavior is so tied in to that of the executer, it might not be as effective. I don't think it's a big deal if you get rid of the test, but it would be nice to validate that the retry processor properly interacts with its delegate to future-proof the behavior. |
6c1ec1e
to
72d35b1
Compare
72d35b1
to
f981dec
Compare
Signed-off-by: Pavlo Shevchenko <[email protected]>
d57b636
to
86c0c5d
Compare
Signed-off-by: Pavlo Shevchenko <[email protected]>
a30f99a
to
18fa3e5
Compare
This, unfortunately, did not work. We can retry failures in the param providers. I experimented a bit with dynamic tests and so on, but with no luck. I'll take another look at it after the release. We need to get it to the customer soon. |
…alization Signed-off-by: Pavlo Shevchenko <[email protected]>
This reverts commit 7b985ac. Signed-off-by: Pavlo Shevchenko <[email protected]>
9604c5b
to
ceba270
Compare
This is a fix for the issue raised in gradle/gradle#29633.
Build operations for test events are handled in Gradle by registering a
TestListenerInternal
instance that tracks running tests and generates a build operation when a test starts/stops. We have a hierarchy of operations similar to the following:When we have an issue with initializing a test during a retry, we end up in a situation where the retry test result processor thinks that another retry is possible, so it does not notify its delegate that the test run is complete. However, the test retry executer sees that there were tests that were marked for retry, but were not retried, and throws an exception. The result of this is that the "test run" build operation is never completed, causing the "dangling build operation" failure.
Reproducing the behavior in the original report is problematic as it requires the develocity plugin which applies its own version of the retry plugin. So the reproducer test only checks that the retry plugin is always calling the started/completed methods for the
TestListenerInternal
broadcaster for every test descriptor (including the one for the overall test run).