Skip to content

Commit faa3d28

Browse files
committed
DelayerUsageTests as @RetryingTest
**Auto-cherry-pick to `7.0.x` & `6.5.x`**
1 parent 883b9d7 commit faa3d28

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

spring-integration-core/src/test/java/org/springframework/integration/config/xml/DelayerUsageTests.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package org.springframework.integration.config.xml;
1818

19-
import org.junit.jupiter.api.Test;
19+
import org.junitpioneer.jupiter.RetryingTest;
2020

2121
import org.springframework.beans.factory.annotation.Autowired;
2222
import 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

Comments
 (0)