lct45 commented on a change in pull request #9239: URL: https://github.com/apache/kafka/pull/9239#discussion_r486673070
########## File path: streams/src/test/java/org/apache/kafka/streams/kstream/internals/KStreamSlidingWindowAggregateTest.java ########## @@ -78,16 +100,28 @@ public void testAggregateSmallInput() { final StreamsBuilder builder = new StreamsBuilder(); final String topic = "topic"; - - final KTable<Windowed<String>, String> table = builder - .stream(topic, Consumed.with(Serdes.String(), Serdes.String())) - .groupByKey(Grouped.with(Serdes.String(), Serdes.String())) - .windowedBy(SlidingWindows.withTimeDifferenceAndGrace(ofMillis(10), ofMillis(50))) - .aggregate( - MockInitializer.STRING_INIT, - MockAggregator.TOSTRING_ADDER, - Materialized.<String, String, WindowStore<Bytes, byte[]>>as("topic-Canonized").withValueSerde(Serdes.String()) - ); + final KTable<Windowed<String>, String> table; + if (inOrderIterator) { + table = builder + .stream(topic, Consumed.with(Serdes.String(), Serdes.String())) + .groupByKey(Grouped.with(Serdes.String(), Serdes.String())) + .windowedBy(SlidingWindows.withTimeDifferenceAndGrace(ofMillis(10), ofMillis(50))) + .aggregate( + MockInitializer.STRING_INIT, + MockAggregator.TOSTRING_ADDER, + Materialized.as(new InOrderMemoryWindowStoreSupplier("InOrder", 50000L, 10L, false)) + ); + } else { + table = builder + .stream(topic, Consumed.with(Serdes.String(), Serdes.String())) + .groupByKey(Grouped.with(Serdes.String(), Serdes.String())) + .windowedBy(SlidingWindows.withTimeDifferenceAndGrace(ofMillis(10), ofMillis(50))) + .aggregate( + MockInitializer.STRING_INIT, + MockAggregator.TOSTRING_ADDER, + Materialized.<String, String, WindowStore<Bytes, byte[]>>as("topic-Canonized").withValueSerde(Serdes.String()) Review comment: I based the aggregate function off something else so `topic-Canonized` must be from there. It seems like _generally_, `valueSerde` doesn't need to be set to string so I removed it in most places. Changing to the custom window store made it complain about doing `Serdes.String` (it wanted an object) and it appears that we need a `Serdes.String` for the grace test so I'll mess around with that one more to see how it can be run with both iterators ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org