Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1844,19 +1844,17 @@ public void process(final Object key, final Object value) {}
assertEquals(0, punctuatedWallClockTime.size());

mockTime.sleep(100L);
for (long i = 0L; i < 10L; i++) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we remove this loop?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we do not need it really: a single record is sufficient to trigger the punctuation.

clientSupplier.consumer.addRecord(new ConsumerRecord<>(
topic1,
1,
i,
i * 100L,
TimestampType.CREATE_TIME,
ConsumerRecord.NULL_CHECKSUM,
("K" + i).getBytes().length,
("V" + i).getBytes().length,
("K" + i).getBytes(),
("V" + i).getBytes()));
}
clientSupplier.consumer.addRecord(new ConsumerRecord<>(
topic1,
1,
100L,
100L,
TimestampType.CREATE_TIME,
ConsumerRecord.NULL_CHECKSUM,
"K".getBytes().length,
"V".getBytes().length,
"K".getBytes(),
"V".getBytes()));

thread.runOnce();

Expand Down Expand Up @@ -1936,19 +1934,19 @@ public void process(final Object key, final Object value) {
clientSupplier.consumer.addRecord(new ConsumerRecord<>(
topic1,
1,
0L,
100L,
TimestampType.CREATE_TIME,
ConsumerRecord.NULL_CHECKSUM,
"K".getBytes().length,
"V".getBytes().length,
"K".getBytes(),
"V".getBytes()));
110L,
110L,
TimestampType.CREATE_TIME,
ConsumerRecord.NULL_CHECKSUM,
"K".getBytes().length,
"V".getBytes().length,
"K".getBytes(),
"V".getBytes()));

thread.runOnce();

assertEquals(2, peekedContextTime.size());
assertEquals(0L, peekedContextTime.get(1).longValue());
assertEquals(110L, peekedContextTime.get(1).longValue());
}

@Test
Expand Down