Skip to content

Commit

Permalink
Fixes flaky test.
Browse files Browse the repository at this point in the history
  • Loading branch information
chickenchickenlove committed Oct 12, 2024
1 parent e8378da commit 967a7c4
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,10 @@ void firstShortFailAndLastLongSuccessRetryTest(
assertThat(awaitLatch(latchContainer.dltCountdownLatch1)).isTrue();

assertThat(destinationTopic.getDestinationName()).isEqualTo(expectedRetryTopic);
assertThat(testTopicListener1.receivedMsgs).containsExactly(expectedReceivedMsgs);
assertThat(testTopicListener1.receivedTopics).containsExactly(expectedReceivedTopics);
assertThat(testTopicListener1.receivedMsgs).containsExactlyInAnyOrder(expectedReceivedMsgs);
assertThat(testTopicListener1.receivedTopics).containsExactlyInAnyOrder(expectedReceivedTopics);

assertThat(myCustomDltProcessor1.receivedMsg).containsExactly(expectedDltMsgs);
assertThat(myCustomDltProcessor1.receivedMsg).containsExactlyInAnyOrder(expectedDltMsgs);
}

@Test
Expand Down Expand Up @@ -261,10 +261,10 @@ void firstLongSuccessAndLastShortFailed(
assertThat(awaitLatch(latchContainer.dltCountdownLatch2)).isTrue();

assertThat(destinationTopic.getDestinationName()).isEqualTo(expectedRetryTopic);
assertThat(zero2TopicListener.receivedMsgs).containsExactly(expectedReceivedMsgs);
assertThat(zero2TopicListener.receivedTopics).containsExactly(expectedReceivedTopics);
assertThat(zero2TopicListener.receivedMsgs).containsExactlyInAnyOrder(expectedReceivedMsgs);
assertThat(zero2TopicListener.receivedTopics).containsExactlyInAnyOrder(expectedReceivedTopics);

assertThat(myCustomDltProcessor2.receivedMsg).containsExactly(expectedDltMsgs);
assertThat(myCustomDltProcessor2.receivedMsg).containsExactlyInAnyOrder(expectedDltMsgs);
}

@Test
Expand Down Expand Up @@ -325,10 +325,10 @@ void longFailMsgTwiceThenShortSucessMsgThird(
assertThat(awaitLatch(latchContainer.dltCountdownLatch3)).isTrue();

assertThat(destinationTopic.getDestinationName()).isEqualTo(expectedRetryTopic);
assertThat(testTopicListener3.receivedMsgs).containsExactly(expectedReceivedMsgs);
assertThat(testTopicListener3.receivedTopics).containsExactly(expectedReceivedTopics);
assertThat(testTopicListener3.receivedMsgs).containsExactlyInAnyOrder(expectedReceivedMsgs);
assertThat(testTopicListener3.receivedTopics).containsExactlyInAnyOrder(expectedReceivedTopics);

assertThat(myCustomDltProcessor3.receivedMsg).containsExactly(expectedDltMsgs);
assertThat(myCustomDltProcessor3.receivedMsg).containsExactlyInAnyOrder(expectedDltMsgs);
}

@Test
Expand Down Expand Up @@ -386,10 +386,10 @@ void longSuccessMsgTwiceThenShortFailMsgTwice(
assertThat(awaitLatch(latchContainer.dltCountdownLatch4)).isTrue();

assertThat(destinationTopic.getDestinationName()).isEqualTo(expectedRetryTopic);
assertThat(topicListener4.receivedMsgs).containsExactly(expectedReceivedMsgs);
assertThat(topicListener4.receivedTopics).containsExactly(expectedReceivedTopics);
assertThat(topicListener4.receivedMsgs).containsExactlyInAnyOrder(expectedReceivedMsgs);
assertThat(topicListener4.receivedTopics).containsExactlyInAnyOrder(expectedReceivedTopics);

assertThat(myCustomDltProcessor4.receivedMsg).containsExactly(expectedDltMsgs);
assertThat(myCustomDltProcessor4.receivedMsg).containsExactlyInAnyOrder(expectedDltMsgs);
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,10 @@ void firstShortFailAndLastLongSuccessRetryTest(
assertThat(awaitLatch(latchContainer.dltCountdownLatch1)).isTrue();

assertThat(destinationTopic.getDestinationName()).isEqualTo(expectedRetryTopic);
assertThat(testTopicListener1.receivedMsgs).containsExactly(expectedReceivedMsgs);
assertThat(testTopicListener1.receivedTopics).containsExactly(expectedReceivedTopics);
assertThat(testTopicListener1.receivedMsgs).containsExactlyInAnyOrder(expectedReceivedMsgs);
assertThat(testTopicListener1.receivedTopics).containsExactlyInAnyOrder(expectedReceivedTopics);

assertThat(myCustomDltProcessor1.receivedMsg).containsExactly(expectedDltMsgs);
assertThat(myCustomDltProcessor1.receivedMsg).containsExactlyInAnyOrder(expectedDltMsgs);
}

@Test
Expand Down Expand Up @@ -260,10 +260,10 @@ void firstLongSuccessAndLastShortFailed(
assertThat(awaitLatch(latchContainer.dltCountdownLatch2)).isTrue();

assertThat(destinationTopic.getDestinationName()).isEqualTo(expectedRetryTopic);
assertThat(zero2TopicListener.receivedMsgs).containsExactly(expectedReceivedMsgs);
assertThat(zero2TopicListener.receivedTopics).containsExactly(expectedReceivedTopics);
assertThat(zero2TopicListener.receivedMsgs).containsExactlyInAnyOrder(expectedReceivedMsgs);
assertThat(zero2TopicListener.receivedTopics).containsExactlyInAnyOrder(expectedReceivedTopics);

assertThat(myCustomDltProcessor2.receivedMsg).containsExactly(expectedDltMsgs);
assertThat(myCustomDltProcessor2.receivedMsg).containsExactlyInAnyOrder(expectedDltMsgs);
}

@Test
Expand Down Expand Up @@ -324,10 +324,10 @@ void longFailMsgTwiceThenShortSuccessMsgThird(
assertThat(awaitLatch(latchContainer.dltCountdownLatch3)).isTrue();

assertThat(destinationTopic.getDestinationName()).isEqualTo(expectedRetryTopic);
assertThat(testTopicListener3.receivedMsgs).containsExactly(expectedReceivedMsgs);
assertThat(testTopicListener3.receivedTopics).containsExactly(expectedReceivedTopics);
assertThat(testTopicListener3.receivedMsgs).containsExactlyInAnyOrder(expectedReceivedMsgs);
assertThat(testTopicListener3.receivedTopics).containsExactlyInAnyOrder(expectedReceivedTopics);

assertThat(myCustomDltProcessor3.receivedMsg).containsExactly(expectedDltMsgs);
assertThat(myCustomDltProcessor3.receivedMsg).containsExactlyInAnyOrder(expectedDltMsgs);
}

@Test
Expand Down Expand Up @@ -385,10 +385,10 @@ void longSuccessMsgTwiceThenShortFailMsgTwice(
assertThat(awaitLatch(latchContainer.dltCountdownLatch4)).isTrue();

assertThat(destinationTopic.getDestinationName()).isEqualTo(expectedRetryTopic);
assertThat(topicListener4.receivedMsgs).containsExactly(expectedReceivedMsgs);
assertThat(topicListener4.receivedTopics).containsExactly(expectedReceivedTopics);
assertThat(topicListener4.receivedMsgs).containsExactlyInAnyOrder(expectedReceivedMsgs);
assertThat(topicListener4.receivedTopics).containsExactlyInAnyOrder(expectedReceivedTopics);

assertThat(myCustomDltProcessor4.receivedMsg).containsExactly(expectedDltMsgs);
assertThat(myCustomDltProcessor4.receivedMsg).containsExactlyInAnyOrder(expectedDltMsgs);
}

@Test
Expand Down

0 comments on commit 967a7c4

Please sign in to comment.