Skip to content

Commit

Permalink
Comment typo
Browse files Browse the repository at this point in the history
  • Loading branch information
coralblocks committed Oct 28, 2024
1 parent a4055cb commit 0fc15cb
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public static void main(String[] args) throws InterruptedException {

System.out.println();

// Where there any duplicates?
// Were there any duplicates?
for(int i = 0; i < consumers.length; i++) {
if (consumers[i].getMessagesReceived().stream().distinct().count() == consumers[i].getMessagesReceived().size()) System.out.println("SUCCESS: " + consumers[i].getName() + " received no duplicate messages!");
else System.out.println("ERROR: Found duplicate messages!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public static void main(String[] args) throws InterruptedException {
if (totalMessagesReceived.size() == messagesToSend) System.out.println("SUCCESS: All messages received! => " + messagesToSend);
else System.out.println("ERROR: Wrong number of messages received! => " +totalMessagesReceived.size());

// Where there any duplicates?
// Were there any duplicates?
if (totalMessagesReceived.stream().distinct().count() == totalMessagesReceived.size()) System.out.println("SUCCESS: No duplicate messages were received!");
else System.out.println("ERROR: Found duplicate messages!");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public static void main(String[] args) throws InterruptedException {
if (messagesReceived.size() == totalMessagesToSend) System.out.println("SUCCESS: All messages received! => " + totalMessagesToSend);
else System.out.println("ERROR: Wrong number of messages received! => " + messagesReceived.size());

// Where there any duplicates?
// Were there any duplicates?
if (messagesReceived.stream().distinct().count() == messagesReceived.size()) System.out.println("SUCCESS: No duplicate messages were received!");
else System.out.println("ERROR: Found duplicate messages!");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ public static void main(String[] args) throws InterruptedException {
if (messagesReceived.size() == totalMessagesToSend) System.out.println("SUCCESS: All messages received! => " + totalMessagesToSend);
else System.out.println("ERROR: Wrong number of messages received! => " + messagesReceived.size());

// Where there any duplicates?
// Were there any duplicates?
if (messagesReceived.stream().distinct().count() == messagesReceived.size()) System.out.println("SUCCESS: No duplicate messages were received!");
else System.out.println("ERROR: Found duplicate messages!");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public static void main(String[] args) throws InterruptedException {
if (messagesReceived.stream().distinct().count() == messagesReceived.size()) System.out.println("SUCCESS: No duplicate messages were received!");
else System.out.println("ERROR: Found duplicate messages!");

// Where the messages received in order?
// Were the messages received in order?
List<Long> sortedList = new ArrayList<Long>(messagesReceived);
Collections.sort(sortedList);
if (sortedList.equals(messagesReceived)) System.out.println("SUCCESS: Messages were received in order!");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void testAll() throws InterruptedException {
Assert.assertEquals(consumers[i].getMessagesReceived().size(), messagesToSend);
}

// Where there any duplicates?
// Were there any duplicates?
for(int i = 0; i < consumers.length; i++) {
Assert.assertEquals(consumers[i].getMessagesReceived().stream().distinct().count(), consumers[i].getMessagesReceived().size());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public void testAll() throws InterruptedException {
// Did we receive all messages?
Assert.assertEquals(totalMessagesReceived.size(), messagesToSend);

// Where there any duplicates?
// Were there any duplicates?
Assert.assertEquals(totalMessagesReceived.stream().distinct().count(), totalMessagesReceived.size());

// If we sum all batches do we get the correct number of messages?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void testAll() throws InterruptedException {
// Did we receive all messages?
Assert.assertEquals(messagesReceived.size(), totalMessagesToSend);

// Where there any duplicates?
// Were there any duplicates?
Assert.assertEquals(messagesReceived.stream().distinct().count(), messagesReceived.size());

// If we sum all batches do we get the correct number of messages?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void testAll() throws InterruptedException {
// Did we receive all messages?
Assert.assertEquals(messagesReceived.size(), totalMessagesToSend);

// Where there any duplicates?
// Were there any duplicates?
Assert.assertEquals(messagesReceived.stream().distinct().count(), messagesReceived.size());

// If we sum all batches do we get the correct number of messages?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public void testAll() throws InterruptedException {
// Where there any duplicates?
Assert.assertEquals(messagesReceived.stream().distinct().count(), messagesReceived.size());

// Where the messages received in order?
// Were the messages received in order?
List<Long> sortedList = new ArrayList<Long>(messagesReceived);
Collections.sort(sortedList);
Assert.assertEquals(sortedList, messagesReceived);
Expand Down

0 comments on commit 0fc15cb

Please sign in to comment.