Skip to content

Commit 569024e

Browse files
committed
GH-1055: Fix new test race conditions
1 parent bf979dd commit 569024e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-rabbit/src/test/java/org/springframework/amqp/rabbit/core/RabbitTemplatePublisherCallbacksIntegrationTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ public void testPublisherConfirmMultipleWithTwoListeners() throws Exception {
538538
});
539539
final RabbitTemplate template2 = new RabbitTemplate(ccf);
540540

541-
final CountDownLatch latch2 = new CountDownLatch(1);
541+
final CountDownLatch latch2 = new CountDownLatch(2);
542542
template2.setConfirmCallback((correlationData, ack, cause) -> {
543543
if (ack) {
544544
confirms.add(correlationData.getId() + "2");
@@ -601,8 +601,8 @@ public void testConcurrentConfirms() throws Exception {
601601
delayAckProcessingLatch.await(2, TimeUnit.SECONDS);
602602
// only delay first time through
603603
delayAckProcessingLatch.countDown();
604-
waitForAll3AcksLatch.countDown();
605604
acks.incrementAndGet();
605+
waitForAll3AcksLatch.countDown();
606606
}
607607
catch (InterruptedException e) {
608608
e.printStackTrace();

0 commit comments

Comments
 (0)