[ https://issues.apache.org/jira/browse/SUREFIRE-1379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16035888#comment-16035888 ]
Gilberto Torrezan commented on SUREFIRE-1379: --------------------------------------------- Sorry, putting a delay on `@Before` doesn't solve the problem. First, because I want a delay only between retry attempts, not on regular executions. For example, if I have 10 tests, and all of them run without problems, no delay is inserted. But, if the 9th test fails, and the `rerunFailingTestsCount` property is greater than 0, it will be rerun. And in this case I want it to sleep for some seconds before rerunning again. Second, yes, nobody wants to slow down tests. That's why my proposal is about creating a property for the plugin, let's say `timeBetweenRerunAttempts` (or a better name), that would be 0 by default. No tests would be impacted unless you specify so. Third, and that's indeed just my problem: Currently I have more than 1300 tests in my application, and since we already manage retries of failed tests by using the failsafe plugin (and the `rerunFailingTestsCount` property), it looks like a good place to also configure this delay I've mentioned. It's totally impractical to go test-by-test and introduce the delay by hand (also because it doesn't actually solve the problem, see above). As a side-note, not related to the issue at hand: can you point me instructions on how to properly submit issues to this project? I've tried using a [job story format|https://blog.intercom.com/using-job-stories-design-features-ui-ux/], but it caused more confusion than it helped. Thanks! > When rerunning failed tests, I want to be able to set a delay between each > attempt, so the whole test suite doesn't fail due to a connection problem to > 3rd party services. > --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: SUREFIRE-1379 > URL: https://issues.apache.org/jira/browse/SUREFIRE-1379 > Project: Maven Surefire > Issue Type: Improvement > Components: Maven Failsafe Plugin > Affects Versions: 2.20 > Reporter: Gilberto Torrezan > Assignee: Tibor Digana > > Some of my integration tests require access to 3rd party services that run in > other machines, and sometimes those services stop responding due to network > problems. > I want to be able to set a delay between each attempt to rerun a failed > test, instead of rerunning everything in the same second, so tests that fail > due to connection problems can have better chances of succeed. > Waiting 5 seconds between attempts, in my case, is way cheaper than rerunning > everything again. -- This message was sent by Atlassian JIRA (v6.3.15#6346)