navinko commented on code in PR #11275:
URL: https://github.com/apache/ozone/pull/11275#discussion_r4061492174


##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/container/balancer/TestContainerBalancer.java:
##########
@@ -459,6 +460,59 @@ public void testRejectInvalidStartupConfiguration() throws 
Exception {
     assertSame(ContainerBalancerTask.Status.STOPPED, 
containerBalancer.getBalancerStatus());
   }
 
+  /**
+   * Verifies that a start request rejected during validation does not update 
startedAt of last run.
+   * Prevents startedAt from advancing past stoppedAt, which previously caused 
a negative duration and CLI status crash.
+   */
+  @Test
+  public void testRejectedStartDoesNotModifyStartedAt() throws Exception {
+    // The test first starts and immediately stops the balancer normally.This 
creates a realistic "previous state"

Review Comment:
   Added the space.



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