|
26 | 26 | import org.htmlunit.javascript.background.JavaScriptJobManager; |
27 | 27 | import org.htmlunit.junit.annotation.Tries; |
28 | 28 | import org.junit.jupiter.api.Test; |
| 29 | +import org.junitpioneer.jupiter.RetryingTest; |
29 | 30 |
|
30 | 31 | /** |
31 | 32 | * Tests for {@link WebClient#waitForBackgroundJavaScriptStartingBefore(long)} and |
@@ -90,8 +91,7 @@ public void dontWaitWhenUnnecessary() throws Exception { |
90 | 91 | /** |
91 | 92 | * @throws Exception if the test fails |
92 | 93 | */ |
93 | | - @Test |
94 | | - @Tries(3) |
| 94 | + @RetryingTest(3) |
95 | 95 | public void dontWaitWhenUnnecessary_jobRemovesOtherJob() throws Exception { |
96 | 96 | final String content = DOCTYPE_HTML |
97 | 97 | + "<html>\n" |
@@ -139,8 +139,7 @@ public void dontWaitWhenUnnecessary_jobRemovesOtherJob() throws Exception { |
139 | 139 | * to wait for this job to finish, even if this clearXXX has been called for it. |
140 | 140 | * @throws Exception if the test fails |
141 | 141 | */ |
142 | | - @Test |
143 | | - @Tries(3) |
| 142 | + @RetryingTest(3) |
144 | 143 | public void waitCalledDuringJobExecution() throws Exception { |
145 | 144 | final String html = DOCTYPE_HTML |
146 | 145 | + "<html>\n" |
@@ -250,8 +249,7 @@ public void waitWhenLastJobStartsNewOne() throws Exception { |
250 | 249 | * a few retries should be done to see if new jobs exists. |
251 | 250 | * @throws Exception if the test fails |
252 | 251 | */ |
253 | | - @Test |
254 | | - @Tries(3) |
| 252 | + @RetryingTest(3) |
255 | 253 | public void waitWithsubWindows() throws Exception { |
256 | 254 | final String html = DOCTYPE_HTML |
257 | 255 | + "<html>\n" |
@@ -310,8 +308,7 @@ public void waitWithsubWindows() throws Exception { |
310 | 308 | * . |
311 | 309 | * @throws Exception if the test fails |
312 | 310 | */ |
313 | | - @Test |
314 | | - @Tries(3) |
| 311 | + @RetryingTest(3) |
315 | 312 | public void newJobStartedAfterWait() throws Exception { |
316 | 313 | final String html = DOCTYPE_HTML |
317 | 314 | + "<html>\n" |
@@ -383,8 +380,7 @@ public WebResponse getResponse(final WebRequest request) throws IOException { |
383 | 380 | * jobs occurs when one of this job is not active. |
384 | 381 | * @throws Exception if the test fails |
385 | 382 | */ |
386 | | - @Test |
387 | | - @Tries(3) |
| 383 | + @RetryingTest(3) |
388 | 384 | public void waitForJobThatIsAlreadyLate() throws Exception { |
389 | 385 | final String html = DOCTYPE_HTML |
390 | 386 | + "<html>\n" |
@@ -510,8 +506,7 @@ public void jobSchedulesJobInOtherWindow2() throws Exception { |
510 | 506 | * has not done its job correctly). |
511 | 507 | * @throws Exception if the test fails |
512 | 508 | */ |
513 | | - @Test |
514 | | - @Tries(3) |
| 509 | + @RetryingTest(3) |
515 | 510 | public void waitForBackgroundJavaScriptStartingBefore_hangs() throws Exception { |
516 | 511 | final String html = DOCTYPE_HTML |
517 | 512 | + "<html>\n" |
|
0 commit comments