ableegoldman commented on code in PR #17702:
URL: https://github.com/apache/kafka/pull/17702#discussion_r1830562898
##########
streams/test-utils/src/main/java/org/apache/kafka/streams/TopologyTestDriver.java:
##########
@@ -738,7 +737,14 @@ private Queue<ProducerRecord<byte[], byte[]>>
getRecordsQueue(final String topic
public final <K, V> TestInputTopic<K, V> createInputTopic(final String
topicName,
final
Serializer<K> keySerializer,
final
Serializer<V> valueSerializer) {
- return new TestInputTopic<>(this, topicName, keySerializer,
valueSerializer, Instant.now(), Duration.ZERO);
+ return new TestInputTopic<>(
+ this,
+ topicName,
+ keySerializer,
+ valueSerializer,
+ Instant.ofEpochMilli(mockWallClockTime.milliseconds()),
Review Comment:
This is the main fix: instead of initializing to the current time, we should
initialize to the driver's current time. I feel like this makes more sense
anyway...we mock time in the driver so why should the TestInputTopic use a view
of time based on actual wallclock time rather than the driver's time?
And would this need a KIP?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]