FrankChen021 commented on code in PR #19875:
URL: https://github.com/apache/druid/pull/19875#discussion_r3715128053
##########
extensions-core/orc-extensions/src/test/java/org/apache/druid/data/input/orc/OrcReaderTest.java:
##########
@@ -299,22 +299,21 @@
final InputRow row = iterator.next();
actualRowCount++;
- Assert.assertEquals("7.0",
Iterables.getOnlyElement(row.getDimension("min")));
- Assert.assertEquals("8.0",
Iterables.getOnlyElement(row.getDimension("avg")));
- Assert.assertEquals("9.0",
Iterables.getOnlyElement(row.getDimension("max")));
- Assert.assertEquals("24.0",
Iterables.getOnlyElement(row.getDimension("sum")));
- Assert.assertEquals("3",
Iterables.getOnlyElement(row.getDimension("len")));
+ Assertions.assertEquals("7.0",
Iterables.getOnlyElement(row.getDimension("min")));
+ Assertions.assertEquals("8.0",
Iterables.getOnlyElement(row.getDimension("avg")));
+ Assertions.assertEquals("9.0",
Iterables.getOnlyElement(row.getDimension("max")));
+ Assertions.assertEquals("24.0",
Iterables.getOnlyElement(row.getDimension("sum")));
+ Assertions.assertEquals("3",
Iterables.getOnlyElement(row.getDimension("len")));
//deviation of [7,8,9] is 1/3, stddev is sqrt(1/3), approximately
0.8165
- Assert.assertEquals(0.8165,
Double.parseDouble(Iterables.getOnlyElement(row.getDimension("stddev"))),
0.0001);
+ Assertions.assertEquals(0.8165,
Double.parseDouble(Iterables.getOnlyElement(row.getDimension("stddev"))),
0.0001);
Review Comment:
Evaluated as baseline. The flagged `Double.parseDouble(...)` was already
present at this location on `master`; this migration only changes
`Assert.assertEquals` to `Assertions.assertEquals`. The JUnit migration does
not introduce the NumberFormatException path, so I’m leaving it unchanged.
##########
extensions-core/ec2-extensions/src/test/java/org/apache/druid/indexing/overlord/autoscaling/ec2/EC2AutoScalerTest.java:
##########
@@ -140,7 +140,7 @@
);
final int n = 150;
- Assert.assertTrue(n <= 2 * EC2AutoScaler.MAX_AWS_FILTER_VALUES);
+ Assertions.assertTrue(n <= 2 * EC2AutoScaler.MAX_AWS_FILTER_VALUES);
Review Comment:
Evaluated as baseline. This constant-bound assertion was already present on
`master`; the migration only changes `Assert.assertTrue` to
`Assertions.assertTrue`. The assertion is outside the scope of this JUnit
migration, so I’m leaving it unchanged.
##########
extensions-core/ec2-extensions/src/test/java/org/apache/druid/indexing/overlord/autoscaling/ec2/EC2AutoScalerTest.java:
##########
@@ -193,7 +193,7 @@
);
final int n = 150;
- Assert.assertTrue(n <= 2 * EC2AutoScaler.MAX_AWS_FILTER_VALUES);
+ Assertions.assertTrue(n <= 2 * EC2AutoScaler.MAX_AWS_FILTER_VALUES);
Review Comment:
Evaluated as baseline. This constant-bound assertion was already present on
`master`; the migration only changes `Assert.assertTrue` to
`Assertions.assertTrue`. The assertion is outside the scope of this JUnit
migration, so I’m leaving it unchanged.
--
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]