ChenSammi commented on code in PR #8056:
URL: https://github.com/apache/ozone/pull/8056#discussion_r1995242304
##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/diskbalancer/TestDiskBalancerService.java:
##########
@@ -170,6 +180,86 @@ private DiskBalancerServiceTestImpl getDiskBalancerService(
threadCount);
}
+ static List<Integer> createVolumeSet() {
+ List<Integer> params = new ArrayList<>();
+ for (int i = 0; i < 4; i++) {
+ params.add(i);
+ }
+ return params;
+ }
+
+ @ParameterizedTest
+ @MethodSource("createVolumeSet")
+ public void testCalculateBytesToMove(Integer i) throws IOException {
Review Comment:
Please change the prameter something like following
public static Stream<Arguments> values() {
return Stream.of(
arguments(0, 0, 0),
arguments(1, 0, 0),
arguments(1, 50, 0),
arguments(2, 0, 0),
arguments(2, 10, 0),
arguments(2, 50, 40), // one disk is 50% above average, the other
disk is 50% below average
arguments(3, 0, 0),
arguments(3, 10, 0),
arguments(4, 0, 0),
arguments(4, 50, 40), // two disks are 50% above average, the other
two disks are 50% below average
);
}
@ParameterizedTest
@MethodSource("values")
public void testCalculateBytesToMove(int volumeCount, int
deltaUsagePercent, long expectedBytesToMovePercent) throws IOException {
--
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]