Update apache-kafka-2/src/test/java/com/baeldung/kafka/message/ordering/MultiplePartitionIntegrationTest.java

Co-authored-by: Liam Williams <liam.williams@zoho.com>
This commit is contained in:
Amol Gote 2023-11-04 16:57:47 -04:00 committed by GitHub
parent 3e2975196d
commit 9c463c752b
1 changed files with 3 additions and 10 deletions

View File

@ -89,15 +89,8 @@ public class MultiplePartitionIntegrationTest {
receivedUserEventList.add(userEvent);
System.out.println("User Event ID: " + userEvent.getUserEventId());
});
for (int insertPosition = 0; insertPosition <= receivedUserEventList.size() - 1; insertPosition++) {
if (isOrderMaintained){
UserEvent sentUserEvent = sentUserEventList.get(insertPosition);
UserEvent receivedUserEvent = receivedUserEventList.get(insertPosition);
if (!sentUserEvent.equals(receivedUserEvent)) {
isOrderMaintained = false;
}
}
}
assertFalse(isOrderMaintained);
assertThat(receivedUserEventList)
.isNotEqualTo(sentUserEventList)
.containsExactlyInAnyOrderElementsOf(sentUserEventList);
}
}