zheguang commented on code in PR #22221:
URL: https://github.com/apache/kafka/pull/22221#discussion_r3216698573
##########
streams/src/test/java/org/apache/kafka/streams/kstream/internals/KStreamRepartitionTest.java:
##########
@@ -170,4 +176,39 @@ private String toRepartitionTopicName(final String input) {
private String repartitionOutputTopic(final Properties props, final String
repartitionOperationName) {
return props.getProperty(StreamsConfig.APPLICATION_ID_CONFIG) + "-" +
repartitionOperationName + "-repartition";
}
+
+ @Test
+ public void canMarkAsPartitionedWhenKeyNotChanging() {
+ final KStream<Integer, String> notMarked = builder.<Integer,
String>stream(inputTopic).mapValues(v -> v + ":" + v);
+ final String topologyNotMarked = builder.build().describe().toString();
+ notMarked.markAsPartitioned();
+ final String topologyMarked = builder.build().describe().toString();
+ assertEquals(topologyNotMarked, topologyMarked);
Review Comment:
Hm... leaning towards keeping as is for the spec: "markAsPartitioned is
no-op when no key changing". Testing implementation details might be an
overkill.
--
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]