ijuma commented on a change in pull request #9856:
URL: https://github.com/apache/kafka/pull/9856#discussion_r554820416



##########
File path: 
streams/test-utils/src/test/java/org/apache/kafka/streams/TopologyTestDriverTest.java
##########
@@ -125,25 +124,20 @@
         consumerRecordFactory.create(SOURCE_TOPIC_2, key2, value2, timestamp2);
 
     private TopologyTestDriver testDriver;
-    private final Properties config;
+    private Properties config;
     private KeyValueStore<String, Long> store;
 
     private final StringDeserializer stringDeserializer = new 
StringDeserializer();
     private final LongDeserializer longDeserializer = new LongDeserializer();
 
-    @Parameterized.Parameters(name = "Eos enabled = {0}")
-    public static Collection<Object[]> data() {
-        final List<Object[]> values = new ArrayList<>();
-        for (final boolean eosEnabled : Arrays.asList(true, false)) {
-            values.add(new Object[] {eosEnabled});
-        }
-        return values;
+    public static Stream<Arguments> parameters() {
+        return Stream.of(true, false).map(Arguments::of);
     }
 
-    public TopologyTestDriverTest(final boolean eosEnabled) {
+    private void setProperties(final boolean eosEnabled) {
         config = mkProperties(mkMap(
-            mkEntry(StreamsConfig.APPLICATION_ID_CONFIG, 
"test-TopologyTestDriver"),
-            mkEntry(StreamsConfig.STATE_DIR_CONFIG, 
TestUtils.tempDirectory().getAbsolutePath())
+                mkEntry(StreamsConfig.APPLICATION_ID_CONFIG, 
"test-TopologyTestDriver"),
+                mkEntry(StreamsConfig.STATE_DIR_CONFIG, 
TestUtils.tempDirectory().getAbsolutePath())

Review comment:
       Indentation change unnecessary.

##########
File path: 
streams/test-utils/src/test/java/org/apache/kafka/streams/TopologyTestDriverTest.java
##########
@@ -1832,8 +1916,10 @@ public void process(final Record<String, String> record) 
{
         }
     }
 
-    @Test
-    public void shouldRespectTaskIdling() {
+    @ParameterizedTest(name = "Eos enabled = {0}")
+    @MethodSource("parameters")

Review comment:
       There is a huge amount of duplication in this parameterized test given 
the lack of class based parameterization in JUnit 5. I wonder if there's a 
better way of converting this test. Thoughts?




----------------------------------------------------------------
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:
[email protected]


Reply via email to