Closed guai closed 1 year ago
This what we do in our own functional tests: https://github.com/gradle/test-retry-gradle-plugin/blob/f585427bfee334628ec140443e6a914db6091642/plugin/src/test/groovy/org/gradle/testretry/AbstractPluginFuncTest.groovy#L64-L80
You could do a simplified version of that that checks for the existence of a file and creates it in the first iteration but fails and passed in the second execution because the file already exists.
I want to test if this retrying work as expected before introducing it into my CI pipeline. So, I guess I need to emulate somehow a test failing on the first run and successful on any subsequent ones.