Follow-up: Refactor the unit test a bit
Reviewers: Matthias J. Sax
@@ -1844,19 +1844,17 @@ public class StreamThreadTest {
assertEquals(0, punctuatedWallClockTime.size());
mockTime.sleep(100L);
- for (long i = 0L; i < 10L; i++) {
clientSupplier.consumer.addRecord(new ConsumerRecord<>(
topic1,
1,
- i,
- i * 100L,
+ 100L,
+ 100L,
TimestampType.CREATE_TIME,
ConsumerRecord.NULL_CHECKSUM,
- ("K" + i).getBytes().length,
- ("V" + i).getBytes().length,
- ("K" + i).getBytes(),
- ("V" + i).getBytes()));
- }
+ "K".getBytes().length,
+ "V".getBytes().length,
+ "K".getBytes(),
+ "V".getBytes()));
thread.runOnce();
@@ -1936,8 +1934,8 @@ public class StreamThreadTest {
clientSupplier.consumer.addRecord(new ConsumerRecord<>(
topic1,
1,
- 0L,
- 100L,
+ 110L,
+ 110L,
TimestampType.CREATE_TIME,
ConsumerRecord.NULL_CHECKSUM,
"K".getBytes().length,
@@ -1948,7 +1946,7 @@ public class StreamThreadTest {
thread.runOnce();
assertEquals(2, peekedContextTime.size());
- assertEquals(0L, peekedContextTime.get(1).longValue());
+ assertEquals(110L, peekedContextTime.get(1).longValue());
}
@Test
