Fixing a test race condition
The test testDlqWithNativeSerializationEnabledOnDlqProducer fails on CI occasionally. Adding a sleep of 1 second to give the retrying mechanism enough time to complete.
This commit is contained in:
@@ -544,6 +544,8 @@ public class KafkaBinderTests extends
|
||||
Message<?> receivedMessage = receive(dlqChannel, 5);
|
||||
assertThat(receivedMessage).isNotNull();
|
||||
assertThat(receivedMessage.getPayload()).isEqualTo("foo".getBytes());
|
||||
//Adding a 1 second sleep to give the retrying enough time to complete.
|
||||
Thread.sleep(1000);
|
||||
assertThat(handler.getInvocationCount())
|
||||
.isEqualTo(consumerProperties.getMaxAttempts());
|
||||
assertThat(receivedMessage.getHeaders()
|
||||
|
||||
Reference in New Issue
Block a user