File tree Expand file tree Collapse file tree
spring-integration-zeromq/src/test/java/org/springframework/integration/zeromq/dsl Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121import java .util .concurrent .LinkedBlockingQueue ;
2222import java .util .concurrent .TimeUnit ;
2323
24- import org .junit .jupiter .api . Test ;
24+ import org .junitpioneer .jupiter .RetryingTest ;
2525import org .zeromq .SocketType ;
2626import org .zeromq .ZContext ;
2727
@@ -69,7 +69,7 @@ public class ZeroMqDslTests {
6969 @ Autowired
7070 IntegrationFlowContext integrationFlowContext ;
7171
72- @ Test
72+ @ RetryingTest ( 10 )
7373 void testZeroMqDslIntegration () throws InterruptedException {
7474 BlockingQueue <Message <?>> results = new LinkedBlockingQueue <>();
7575
@@ -102,13 +102,13 @@ void testZeroMqDslIntegration() throws InterruptedException {
102102
103103 assertThat (message .getHeaders ()).containsEntry (ZeroMqHeaders .TOPIC , "someTopic" );
104104
105- message = results .poll (1 , TimeUnit .SECONDS );
105+ message = results .poll (10 , TimeUnit .SECONDS );
106106 assertThat (message ).isNotNull ()
107107 .extracting (Message ::getPayload )
108108 .isEqualTo ("test" );
109109
110110 // With Pub/Sub channel we would have 4 messages.
111- assertThat (results .poll (1 , TimeUnit .SECONDS )).isNull ();
111+ assertThat (results .poll (100 , TimeUnit .MILLISECONDS )).isNull ();
112112
113113 this .integrationFlowContext .getRegistry ()
114114 .values ()
You can’t perform that action at this time.
0 commit comments