You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/08/13 17:44:30 UTC

[GitHub] [kafka] ableegoldman commented on a change in pull request #9174: KAFKA-10395: relax output topic check in TTD to work with dynamic routing

ableegoldman commented on a change in pull request #9174:
URL: https://github.com/apache/kafka/pull/9174#discussion_r470134136



##########
File path: streams/test-utils/src/main/java/org/apache/kafka/streams/TopologyTestDriver.java
##########
@@ -805,10 +805,10 @@ public void advanceWallClockTime(final Duration advance) {
 
     private Queue<ProducerRecord<byte[], byte[]>> getRecordsQueue(final String topicName) {
         final Queue<ProducerRecord<byte[], byte[]>> outputRecords = outputRecordsByTopic.get(topicName);
-        if (outputRecords == null) {
-            if (!processorTopology.sinkTopics().contains(topicName)) {
-                throw new IllegalArgumentException("Unknown topic: " + topicName);
-            }
+        if (outputRecords == null && !processorTopology.sinkTopics().contains(topicName)) {

Review comment:
       What do you mean by "configured"? My understanding is that topics don't actually even "exist" in the TTD, we just use a MockProducer and grab output records from its history to enqueue in the `outputRecordsByTopic` map. So if an output topic hasn't been sent to yet, there's no way to say whether it does or does not exist




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org