slfan1989 commented on code in PR #10272:
URL: https://github.com/apache/ozone/pull/10272#discussion_r3249284645
##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/pipeline/TestWritableECContainerProvider.java:
##########
@@ -194,6 +194,23 @@ void testPipelinesCreatedBasedOnTotalDiskCountWithFactor(
assertReusesExisting(allocated, pipelineLimit);
}
+ @ParameterizedTest
+ @MethodSource("policies")
+ void testPipelinesCreatedBasedOnTotalDiskCountWithFractionalFactor(
+ PipelineChoosePolicy policy) throws IOException {
+ provider = createSubject(policy);
+ double factor = 0.5;
+ providerConf.setMinimumPipelines(1);
+ providerConf.setPipelinePerVolumeFactor(factor);
+ nodeManager.setNumHealthyVolumes(20);
+
+ int volumeCount = nodeManager.totalHealthyVolumeCount();
+ int pipelineLimit =
+ (int) (factor * volumeCount / repConfig.getRequiredNodes());
+ Set<ContainerInfo> allocated = assertDistinctContainers(pipelineLimit);
+ assertReusesExisting(allocated, pipelineLimit);
+ }
+
Review Comment:
Updated the existing factor test to use a fractional value and removed the
duplicate test case.
--
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]