Skip to content

Commit cc9acb2

Browse files
mynameboratshanthoosh
authored andcommitted
Fix ZkLocalApplicationRunner regression introduced by PR apache#951 (apache#1002)
1 parent 1322cb5 commit cc9acb2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

samza-test/src/test/java/org/apache/samza/test/processor/TestZkLocalApplicationRunner.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,16 @@ public void setUp() {
153153
zkUtils = new ZkUtils(zkKeyBuilder, zkClient, ZK_CONNECTION_TIMEOUT_MS, ZK_SESSION_TIMEOUT_MS, new NoOpMetricsRegistry());
154154
zkUtils.connect();
155155

156+
ImmutableMap<String, Integer> topicToPartitionCount = ImmutableMap.of(
157+
inputSinglePartitionKafkaTopic, 1,
158+
outputSinglePartitionKafkaTopic, 1,
159+
inputKafkaTopic, 5,
160+
outputKafkaTopic, 5);
161+
156162
List<NewTopic> newTopics =
157163
ImmutableList.of(inputKafkaTopic, outputKafkaTopic, inputSinglePartitionKafkaTopic, outputSinglePartitionKafkaTopic)
158164
.stream()
159-
.map(topic -> new NewTopic(topic, 5, (short) 1))
165+
.map(topic -> new NewTopic(topic, topicToPartitionCount.get(topic), (short) 1))
160166
.collect(Collectors.toList());
161167

162168
assertTrue("Encountered errors during test setup. Failed to create topics.", createTopics(newTopics));

0 commit comments

Comments
 (0)