Gargi-jais11 commented on code in PR #10271:
URL: https://github.com/apache/ozone/pull/10271#discussion_r3245928422
##########
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/diskbalancer/TestDiskBalancerService.java:
##########
@@ -199,6 +199,32 @@ public void testUpdateService(ContainerTestVersionInfo
versionInfo) throws Excep
svc.shutdown();
}
+ @ContainerTestVersionInfo.ContainerTest
+ public void testRefreshRejectsInvalidDiskBalancerInfo(
+ ContainerTestVersionInfo versionInfo) throws Exception {
+ setLayoutAndSchemaForTest(versionInfo);
+ ContainerSet containerSet = ContainerSet.newReadOnlyContainerSet(1000);
+ ContainerMetrics metrics = ContainerMetrics.create(conf);
+ KeyValueHandler keyValueHandler =
+ new KeyValueHandler(conf, datanodeUuid, containerSet, volumeSet,
+ metrics, c -> {
+ }, new ContainerChecksumTreeManager(conf));
+ DiskBalancerServiceTestImpl svc =
+ getDiskBalancerService(containerSet, conf, keyValueHandler, null, 1);
+
+ assertThrows(IllegalArgumentException.class,
Review Comment:
Make this a parameterised test instead of called three times same assert.
--
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]