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



##########
File path: 
streams/test-utils/src/test/java/org/apache/kafka/streams/TopologyTestDriverTest.java
##########
@@ -448,29 +441,37 @@ private Topology setupTopologyWithInternalTopic(final 
String firstTableName,
         return builder.build(config);
     }
 
-    @Test
-    public void shouldNotRequireParameters() {
+    @ParameterizedTest(name = "{displayName} - {arguments}")

Review comment:
       It seems to me there are three ways to deal with the repeated magic 
string (```name = "{displayName} - {arguments}```) in ```ParameterizedTest```
   
   1. write custom ```TestTemplateInvocationContextProvider``` (junit 5 
extension). However, the current implementation 
(```ParameterizedTestExtension```) is a heavy implementation and so it could 
bring some works to us.
   1. junit 5 has to support ```ParameterizedTest``` at class level: 
https://github.com/junit-team/junit5/issues/878
   1. file a PR to junit 5 to make ```ParameterizedTest``` have "long display 
name" by default , and so we can write following code 
```@ParameterizedTest(name = ParameterizedTest.LONG_DISPLAY_NAME)```
   
   At any rate, ```@ParameterizedTest(name = "{displayName} - {arguments}")``` 
is workaround to us currently and we can improve it in the future If there is 
any more simple solution for junit 5. 
   
   @ijuma WDYT?




----------------------------------------------------------------
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