m1a2st commented on code in PR #23242:
URL: https://github.com/apache/kafka/pull/23242#discussion_r3891479831


##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/ThreadMetadataImpl.java:
##########
@@ -57,7 +57,7 @@ public ThreadMetadataImpl(final String threadName,
                               final Set<TaskMetadata> standbyTasks) {
         this.mainConsumerClientId = mainConsumerClientId;
         this.restoreConsumerClientId = restoreConsumerClientId;
-        this.producerClientIds = Collections.singleton(producerClientIds);
+        this.producerClientIds = producerClientIds != null ? 
Set.of(producerClientIds) : Set.of();

Review Comment:
   We can mock this in the test code, for example 
`Mockito.lenient().when(taskManager.producerClientIds()).thenReturn(CLIENT_ID + 
"-producer")`, since `producerClientIds` is never null in production.



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

Reply via email to