jnh5y commented on code in PR #12161: URL: https://github.com/apache/kafka/pull/12161#discussion_r894006082
########## streams/src/test/java/org/apache/kafka/streams/processor/internals/TaskExecutionMetadataTest.java: ########## @@ -0,0 +1,126 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.kafka.streams.processor.internals; + +import static org.apache.kafka.streams.processor.internals.TopologyMetadata.UNNAMED_TOPOLOGY; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; +import org.apache.kafka.streams.processor.TaskId; +import org.junit.Assert; +import org.junit.Test; + +public class TaskExecutionMetadataTest { + final static String TOPOLOGY1 = "topology1"; + final static String TOPOLOGY2 = "topology2"; + final static Set<String> NAMED_TOPOLOGIES = new HashSet<>(Arrays.asList(TOPOLOGY1, TOPOLOGY2)); + final static int TIME_ZERO = 0; + final static int CONSTANT_BACKOFF_MS = 5000; + + @Test + public void testCanProcessWithoutNamedTopologies() { + final Set<String> topologies = Collections.singleton(UNNAMED_TOPOLOGY); + final Set<String> pausedTopologies = ConcurrentHashMap.newKeySet(); Review Comment: I used `ConcurrentHashMap` since that's what `pausedTopologies` is created as elsewhere. In the unit tests, it can be a `HashSet`, I switched to that. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org