diff --git a/src/main/java/com/coralblocks/coralqueue/example/broadcaster/Basics.java b/src/main/java/com/coralblocks/coralqueue/example/broadcaster/Basics.java index 0a283c6..d932d52 100644 --- a/src/main/java/com/coralblocks/coralqueue/example/broadcaster/Basics.java +++ b/src/main/java/com/coralblocks/coralqueue/example/broadcaster/Basics.java @@ -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!"); diff --git a/src/main/java/com/coralblocks/coralqueue/example/demultiplexer/Basics.java b/src/main/java/com/coralblocks/coralqueue/example/demultiplexer/Basics.java index d4b0d5d..30c105c 100644 --- a/src/main/java/com/coralblocks/coralqueue/example/demultiplexer/Basics.java +++ b/src/main/java/com/coralblocks/coralqueue/example/demultiplexer/Basics.java @@ -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!"); diff --git a/src/main/java/com/coralblocks/coralqueue/example/mpmc/Basics.java b/src/main/java/com/coralblocks/coralqueue/example/mpmc/Basics.java index c5f6ebd..4d15674 100644 --- a/src/main/java/com/coralblocks/coralqueue/example/mpmc/Basics.java +++ b/src/main/java/com/coralblocks/coralqueue/example/mpmc/Basics.java @@ -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!"); diff --git a/src/main/java/com/coralblocks/coralqueue/example/multiplexer/Basics.java b/src/main/java/com/coralblocks/coralqueue/example/multiplexer/Basics.java index 09b9019..76749f4 100644 --- a/src/main/java/com/coralblocks/coralqueue/example/multiplexer/Basics.java +++ b/src/main/java/com/coralblocks/coralqueue/example/multiplexer/Basics.java @@ -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!"); diff --git a/src/main/java/com/coralblocks/coralqueue/example/queue/Basics.java b/src/main/java/com/coralblocks/coralqueue/example/queue/Basics.java index 0dfd1d5..90fdd1c 100644 --- a/src/main/java/com/coralblocks/coralqueue/example/queue/Basics.java +++ b/src/main/java/com/coralblocks/coralqueue/example/queue/Basics.java @@ -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 sortedList = new ArrayList(messagesReceived); Collections.sort(sortedList); if (sortedList.equals(messagesReceived)) System.out.println("SUCCESS: Messages were received in order!"); diff --git a/src/test/java/com/coralblocks/coralqueue/broadcaster/AtomicBroadcasterTest.java b/src/test/java/com/coralblocks/coralqueue/broadcaster/AtomicBroadcasterTest.java index 1b5ce96..ad37a15 100644 --- a/src/test/java/com/coralblocks/coralqueue/broadcaster/AtomicBroadcasterTest.java +++ b/src/test/java/com/coralblocks/coralqueue/broadcaster/AtomicBroadcasterTest.java @@ -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()); } diff --git a/src/test/java/com/coralblocks/coralqueue/demultiplexer/AtomicDemultiplexerTest.java b/src/test/java/com/coralblocks/coralqueue/demultiplexer/AtomicDemultiplexerTest.java index b42a016..d34b9f5 100644 --- a/src/test/java/com/coralblocks/coralqueue/demultiplexer/AtomicDemultiplexerTest.java +++ b/src/test/java/com/coralblocks/coralqueue/demultiplexer/AtomicDemultiplexerTest.java @@ -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? diff --git a/src/test/java/com/coralblocks/coralqueue/mpmc/AtomicMpMcTest.java b/src/test/java/com/coralblocks/coralqueue/mpmc/AtomicMpMcTest.java index 9fa6e46..e1bb827 100644 --- a/src/test/java/com/coralblocks/coralqueue/mpmc/AtomicMpMcTest.java +++ b/src/test/java/com/coralblocks/coralqueue/mpmc/AtomicMpMcTest.java @@ -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? diff --git a/src/test/java/com/coralblocks/coralqueue/multiplexer/AtomicMultiplexerTest.java b/src/test/java/com/coralblocks/coralqueue/multiplexer/AtomicMultiplexerTest.java index 6a2cd91..87de4af 100644 --- a/src/test/java/com/coralblocks/coralqueue/multiplexer/AtomicMultiplexerTest.java +++ b/src/test/java/com/coralblocks/coralqueue/multiplexer/AtomicMultiplexerTest.java @@ -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? diff --git a/src/test/java/com/coralblocks/coralqueue/queue/AtomicQueueTest.java b/src/test/java/com/coralblocks/coralqueue/queue/AtomicQueueTest.java index 75b6ff4..2109c13 100644 --- a/src/test/java/com/coralblocks/coralqueue/queue/AtomicQueueTest.java +++ b/src/test/java/com/coralblocks/coralqueue/queue/AtomicQueueTest.java @@ -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 sortedList = new ArrayList(messagesReceived); Collections.sort(sortedList); Assert.assertEquals(sortedList, messagesReceived);