wcarlson5 commented on code in PR #13942: URL: https://github.com/apache/kafka/pull/13942#discussion_r1259992272
########## streams/src/test/java/org/apache/kafka/streams/kstream/internals/KStreamKTableJoinTest.java: ########## @@ -164,6 +165,53 @@ public void shouldFailIfTableIsNotVersioned() { ); } + @Test + public void shouldFailIfTableIsNotVersionedButMaterializationIsInherited() { + final StreamsBuilder builder = new StreamsBuilder(); + final Properties props = new Properties(); + props.put(StreamsConfig.TOPOLOGY_OPTIMIZATION_CONFIG, StreamsConfig.NO_OPTIMIZATION); + final KStream<String, String> streamA = builder.stream("topic", Consumed.with(Serdes.String(), Serdes.String())); + final KTable<String, String> source = builder.table("topic2", Consumed.with(Serdes.String(), Serdes.String()), + Materialized.as(Stores.inMemoryKeyValueStore("tableB"))); + final KTable<String, String> tableB = source.filter((k, v) -> true); + streamA.join(tableB, (value1, value2) -> value1 + value2, Joined.with(Serdes.String(), Serdes.String(), Serdes.String(), "first-join", Duration.ofMillis(6))).to("out-one"); + + final IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, builder::build); + assertThat( + exception.getMessage(), + is("KTable must be versioned to use a grace period in a stream table join.") + ); + } + + @Test + public void shouldNotFailIfTableIsVersionedButMaterializationIsInherited() { Review Comment: good idea -- 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