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


##########
extensions-core/stats/src/test/java/org/apache/druid/query/aggregation/variance/VarianceTimeseriesQueryTest.java:
##########
@@ -45,37 +44,38 @@
 import java.util.stream.Collectors;
 import java.util.stream.StreamSupport;
 
-@RunWith(Parameterized.class)
 public class VarianceTimeseriesQueryTest extends InitializedNullHandlingTest
 {
-  @Parameterized.Parameters(name = "{0}:descending={1}")
   public static Iterable<Object[]> constructorFeeder()
   {
     return 
StreamSupport.stream(TimeseriesQueryRunnerTest.constructorFeeder().spliterator(),
 false)
                         .map(constructor -> new Object[]{constructor[0], 
constructor[1], constructor[2], constructor[3]})
                         .collect(Collectors.toList());
   }
 
-  private final QueryRunner runner;
-  private final boolean descending;
-  private final Druids.TimeseriesQueryBuilder queryBuilder;
+  private boolean descending;
+  private Druids.TimeseriesQueryBuilder queryBuilder;
 
-  public VarianceTimeseriesQueryTest(
-      QueryRunner runner,
+  public void initVarianceTimeseriesQueryTest(
       boolean descending,
-      boolean vectorize,
-      List<AggregatorFactory> aggregatorFactories
+      boolean vectorize
   )
   {
-    this.runner = runner;
     this.descending = descending;
     this.queryBuilder = Druids.newTimeseriesQueryBuilder()
                               .context(ImmutableMap.of("vectorize", vectorize 
? "force" : "false"));
   }
 
-  @Test
-  public void testTimeseriesWithNullFilterOnNonExistentDimension()
+  @MethodSource("constructorFeeder")
+  @ParameterizedTest(name = "{0}:descending={1}")
+  public void testTimeseriesWithNullFilterOnNonExistentDimension(
+      QueryRunner runner,
+      boolean descending,
+      boolean vectorize,
+      List<AggregatorFactory> aggregatorFactories

Review Comment:
   Fixed in commit `694e17cc4c`. The `aggregatorFactories` parameter was not 
read by this test method. It is now removed from the method signature, and 
`constructorFeeder` returns only the three arguments consumed by the Jupiter 
method: runner, descending, and vectorize. Validation: 264 focused variance 
tests passed; Checkstyle reported 0 violations and SpotBugs reported 0 
bugs/errors.



##########
extensions-core/stats/src/test/java/org/apache/druid/query/aggregation/variance/VarianceTimeseriesQueryTest.java:
##########
@@ -122,9 +122,16 @@
     assertExpectedResults(expectedResults, results);
   }
 
-  @Test
-  public void testEmptyTimeseries()
+  @MethodSource("constructorFeeder")
+  @ParameterizedTest(name = "{0}:descending={1}")
+  public void testEmptyTimeseries(
+      QueryRunner runner,
+      boolean descending,
+      boolean vectorize,
+      List<AggregatorFactory> aggregatorFactories

Review Comment:
   Fixed in commit `694e17cc4c`. The `aggregatorFactories` parameter was not 
read by this test method. It is now removed from the method signature, and 
`constructorFeeder` returns only the three arguments consumed by the Jupiter 
method: runner, descending, and vectorize. Validation: 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