FrankChen021 commented on code in PR #19877:
URL: https://github.com/apache/druid/pull/19877#discussion_r3718168873


##########
extensions-core/stats/src/test/java/org/apache/druid/query/aggregation/variance/VarianceGroupByQueryTest.java:
##########
@@ -90,32 +80,27 @@
     return constructors;
   }
 
-  @BeforeClass
+  @BeforeAll
   public static void setUpClass()
   {
     if (BUFFER_POOLS == null) {
       BUFFER_POOLS = TestGroupByBuffers.createDefault();
     }
   }
 
-  public VarianceGroupByQueryTest(
+  @MethodSource("constructorFeeder")
+  @ParameterizedTest(name = "{0}")
+  public void testGroupByVarianceOnly(
       String testName,
       GroupByQueryConfig config,
       GroupByQueryRunnerFactory factory,
-      QueryRunner runner
+      QueryRunner<ResultRow> runner
   )
   {
-    this.testName = testName;
-    this.config = config;
-    this.factory = factory;
-    this.runner = factory.mergeRunners(Execs.directExecutor(), 
ImmutableList.of(runner));
-    this.queryBuilder = GroupByQuery.builder()
-                                    .setContext(ImmutableMap.of("vectorize", 
config.isVectorize()));
-  }
-
-  @Test
-  public void testGroupByVarianceOnly()
-  {
+    final QueryRunner<ResultRow> mergedRunner =
+        factory.mergeRunners(Execs.directExecutor(), ImmutableList.of(runner));

Review Comment:
   This is a baseline/intentional use. The corresponding 
`QueryRunnerFactory.mergeRunners` call already existed in `offical/master` 
inside the old parameterized constructor; the JUnit 5 migration moved 
equivalent setup into each parameterized test. I verified the master version 
before this follow-up. I am leaving the deprecated API unchanged because no 
safe, narrowly scoped replacement was established and changing it would expand 
this migration cleanup. The test behavior is preserved. Validation after the 
related parameter cleanup: 264 focused variance tests passed; Checkstyle 
reported 0 violations and SpotBugs reported 0 bugs/errors.



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

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to