Skip to content

Commit

Permalink
GH-1055: Fix new test race conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
garyrussell committed Jul 30, 2019
1 parent bf979dd commit 569024e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ public void testPublisherConfirmMultipleWithTwoListeners() throws Exception {
});
final RabbitTemplate template2 = new RabbitTemplate(ccf);

final CountDownLatch latch2 = new CountDownLatch(1);
final CountDownLatch latch2 = new CountDownLatch(2);
template2.setConfirmCallback((correlationData, ack, cause) -> {
if (ack) {
confirms.add(correlationData.getId() + "2");
Expand Down Expand Up @@ -601,8 +601,8 @@ public void testConcurrentConfirms() throws Exception {
delayAckProcessingLatch.await(2, TimeUnit.SECONDS);
// only delay first time through
delayAckProcessingLatch.countDown();
waitForAll3AcksLatch.countDown();
acks.incrementAndGet();
waitForAll3AcksLatch.countDown();
}
catch (InterruptedException e) {
e.printStackTrace();
Expand Down

0 comments on commit 569024e

Please sign in to comment.