Copilot commented on code in PR #10308:
URL: https://github.com/apache/ozone/pull/10308#discussion_r3278307682


##########
hadoop-ozone/cli-admin/src/test/java/org/apache/hadoop/hdds/scm/cli/datanode/TestDiskBalancerSubCommands.java:
##########
@@ -590,6 +595,45 @@ public void testStatusDiskBalancerWithStdin() throws 
Exception {
 
   // ========== DiskBalancerReportSubcommand Tests ==========
 
+  static Stream<Arguments> thresholdRangeReportCases() {
+    return Stream.of(
+        Arguments.of(0.08426521, 10.0, false,
+            "ThresholdRange: (0.00000000, 0.18426521)", "ThresholdRange: (-"),
+        Arguments.of(0.95, 10.0, false,
+            "ThresholdRange: (0.85000000, 1.00000000)", "1.05000000"),
+        Arguments.of(0.95, 10.0, true,
+            "\"thresholdRange\" : \"(0.85000000, 1.00000000)\"", 
"1.05000000"));

Review Comment:
   The JSON-mode test case asserts a substring that depends on Jackson 
pretty-printer whitespace ("\"thresholdRange\" : \"...\""). This is brittle and 
can fail if JSON formatting changes while the data is still correct. Prefer 
parsing the output as JSON (eg via JsonUtils/ObjectMapper) and asserting the 
"thresholdRange" field value equals "(0.85000000, 1.00000000)" and that it does 
not contain the unclamped value.



-- 
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