cadonna commented on code in PR #12427:
URL: https://github.com/apache/kafka/pull/12427#discussion_r928724038
##########
streams/src/test/java/org/apache/kafka/test/StreamsTestUtils.java:
##########
@@ -273,4 +281,70 @@ public static boolean isCheckSupplierCall() {
return Arrays.stream(Thread.currentThread().getStackTrace())
.anyMatch(caller ->
"org.apache.kafka.streams.internals.ApiUtils".equals(caller.getClassName()) &&
"checkSupplier".equals(caller.getMethodName()));
}
+
+ public static StreamTask createStatefulTask(final TaskId taskId,
Review Comment:
That was the idea. I just did not want to pollute too much this PR.
##########
streams/src/main/java/org/apache/kafka/streams/processor/internals/Tasks.java:
##########
@@ -136,10 +139,14 @@ private void createActiveTasks(final Map<TaskId,
Set<TopicPartition>> activeTask
if (!activeTasksToCreate.isEmpty()) {
for (final Task activeTask :
activeTaskCreator.createTasks(mainConsumer, activeTasksToCreate)) {
- activeTasksPerId.put(activeTask.id(), activeTask);
- pendingActiveTasks.remove(activeTask.id());
- for (final TopicPartition topicPartition :
activeTask.inputPartitions()) {
- activeTasksPerPartition.put(topicPartition, activeTask);
+ if (stateUpdater != null) {
Review Comment:
I agree!
--
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]