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

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

View File

@ -92,7 +92,7 @@ public class ExternalSequenceWithTimeWindowIntegrationTest {
records.forEach(record -> {
buffer.add(record.value());
});
while (buffer.size() > 0) {
while (!buffer.isEmpty()) {
if (System.nanoTime() - lastProcessedTime > BUFFER_PERIOD_NS) {
processBuffer(buffer, receivedUserEventList);
lastProcessedTime = System.nanoTime();