1616
1717package org .springframework .integration .config .xml ;
1818
19- import org .junit .jupiter .api . Test ;
19+ import org .junitpioneer .jupiter .RetryingTest ;
2020
2121import org .springframework .beans .factory .annotation .Autowired ;
2222import org .springframework .beans .factory .annotation .Qualifier ;
@@ -68,7 +68,7 @@ public class DelayerUsageTests {
6868 @ Autowired
6969 private PollableChannel outputC ;
7070
71- @ Test
71+ @ RetryingTest ( 10 )
7272 public void testDelayWithDefaultSchedulerAndTransactionSynchronization () {
7373 long start = System .currentTimeMillis ();
7474
@@ -79,7 +79,7 @@ public void testDelayWithDefaultSchedulerAndTransactionSynchronization() {
7979 assertThat (System .currentTimeMillis () - start ).isCloseTo (1000 , withinPercentage (25 ));
8080 }
8181
82- @ Test
82+ @ RetryingTest ( 10 )
8383 public void testDelayWithDefaultSchedulerCustomDelayHeader () {
8484 MessageBuilder <String > builder = MessageBuilder .withPayload ("Hello" );
8585 // set custom delay header
@@ -90,7 +90,7 @@ public void testDelayWithDefaultSchedulerCustomDelayHeader() {
9090 assertThat (System .currentTimeMillis () - start ).isCloseTo (2000 , withinPercentage (25 ));
9191 }
9292
93- @ Test
93+ @ RetryingTest ( 10 )
9494 public void testDelayWithCustomScheduler () {
9595 long start = System .currentTimeMillis ();
9696 inputB .send (new GenericMessage <>("1" ));
@@ -114,7 +114,7 @@ public void testDelayWithCustomScheduler() {
114114 assertThat (System .currentTimeMillis () - start ).isBetween (1000L , 3000L );
115115 }
116116
117- @ Test
117+ @ RetryingTest ( 10 )
118118 public void testDelayerInsideChain () {
119119 long start = System .currentTimeMillis ();
120120 delayerInsideChain .send (new GenericMessage <>("Hello" ));
@@ -124,7 +124,7 @@ public void testDelayerInsideChain() {
124124 assertThat (message .getPayload ()).isEqualTo ("hello" );
125125 }
126126
127- @ Test
127+ @ RetryingTest ( 10 )
128128 public void delayEvaluatedFromExpression () {
129129 long start = System .currentTimeMillis ();
130130 this .inputC .send (new GenericMessage <>("test" ));
0 commit comments