sunm2n commented on code in PR #23636:
URL: https://github.com/apache/kafka/pull/23636#discussion_r4267900510
##########
streams/integration-tests/src/test/java/org/apache/kafka/streams/integration/FineGrainedAutoResetIntegrationTest.java:
##########
@@ -369,27 +369,25 @@ public void shouldThrowExceptionOverlappingPattern() {
//NOTE this would realistically get caught when building topology, the
test is for completeness
builder.stream(Pattern.compile("topic-[A-D]_1"),
Consumed.with(AutoOffsetReset.earliest()));
- try {
- builder.stream(Pattern.compile("topic-[A-D]_1"),
Consumed.with(AutoOffsetReset.latest()));
- builder.build();
- fail("Should have thrown TopologyException");
- } catch (final TopologyException expected) {
- // do nothing
- }
+ builder.stream(Pattern.compile("topic-[A-D]_1"),
Consumed.with(AutoOffsetReset.latest()));
+ assertThrows(
+ TopologyException.class,
+ builder::build,
+ "should not build a topology with the same pattern subscribed
twice"
Review Comment:
Good catch, thanks
Sources with the same pattern are merged in mergeDuplicateSourceNodes,
and the exception only comes from the
conflicting reset policies in StreamSourceNode#merge
Updated the message as suggested
--
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]