frankvicky commented on code in PR #16396:
URL: https://github.com/apache/kafka/pull/16396#discussion_r1647505748


##########
streams/src/test/java/org/apache/kafka/streams/processor/internals/assignment/LegacyStickyTaskAssignorTest.java:
##########
@@ -100,79 +99,71 @@
 import static org.hamcrest.Matchers.is;
 import static org.hamcrest.Matchers.lessThanOrEqualTo;
 import static org.hamcrest.Matchers.not;
-import static org.junit.Assert.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertFalse;
 import static org.mockito.Mockito.spy;
 
-@RunWith(Parameterized.class)
 public class LegacyStickyTaskAssignorTest {
 
     private final List<Integer> expectedTopicGroupIds = asList(1, 2);
     private final Time time = new MockTime();
     private final Map<ProcessId, ClientState> clients = new TreeMap<>();
 
-    private boolean enableRackAwareTaskAssignor;
-
-    @Parameter
-    public String rackAwareStrategy;
-
-    @Before
-    public void setUp() {
-        enableRackAwareTaskAssignor = 
!rackAwareStrategy.equals(StreamsConfig.RACK_AWARE_ASSIGNMENT_STRATEGY_NONE);
-    }
-
-    @Parameterized.Parameters(name = "rackAwareStrategy={0}")
-    public static Collection<Object[]> getParamStoreType() {
-        return asList(new Object[][] {
-            {StreamsConfig.RACK_AWARE_ASSIGNMENT_STRATEGY_NONE},
-            {StreamsConfig.RACK_AWARE_ASSIGNMENT_STRATEGY_MIN_TRAFFIC},
-            {StreamsConfig.RACK_AWARE_ASSIGNMENT_STRATEGY_BALANCE_SUBTOPOLOGY},
-        });
+    static Stream<Arguments> paramStoreType() {

Review Comment:
   Hmmm, maybe not.
   
   The purpose of this PR is to make minimal changes to migrate to JUnit 5. 
Therefore, each method should manually call the setup method and pass 
`rackAwareStrategy` as an argument to determine the value of 
`enableRackAwareTaskAssignor`.



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

Reply via email to