patrik-marton commented on code in PR #17815:
URL: https://github.com/apache/kafka/pull/17815#discussion_r1860214955
##########
connect/mirror-client/src/test/java/org/apache/kafka/connect/mirror/ReplicationPolicyTest.java:
##########
@@ -38,15 +38,19 @@ public void setUp() {
@Test
public void testInternalTopic() {
+ Map<String, Object> config = new HashMap<>();
+ config.put(MirrorClientConfig.REPLICATION_POLICY_SEPARATOR, ".");
+ DEFAULT_REPLICATION_POLICY.configure(config);
+
// starts with '__'
assertTrue(DEFAULT_REPLICATION_POLICY.isInternalTopic("__consumer_offsets"));
// starts with '.'
assertTrue(DEFAULT_REPLICATION_POLICY.isInternalTopic(".hiddentopic"));
- // ends with '.internal': default
DistributedConfig.OFFSET_STORAGE_TOPIC_CONFIG in standalone mode.
+ // starts with 'mm2' and ends with '.internal': default
DistributedConfig.OFFSET_STORAGE_TOPIC_CONFIG in standalone mode.
assertTrue(DEFAULT_REPLICATION_POLICY.isInternalTopic("mm2-offsets.CLUSTER.internal"));
- // ends with '-internal'
-
assertTrue(DEFAULT_REPLICATION_POLICY.isInternalTopic("mm2-offsets-CLUSTER-internal"));
+ // starts with 'mm2' and ends with '-internal'
Review Comment:
My initial idea was that since we changed the behavior and removed the
"-internal" prefix from the regex, a test showing that it is not considered an
internal topic anymore would be nice, but you're right that it is basically the
same as the non-internal test, so in that sense this can be removed.
--
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]