adoroszlai commented on code in PR #5516:
URL: https://github.com/apache/ozone/pull/5516#discussion_r1379778612


##########
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/node/TestContainerPlacement.java:
##########
@@ -89,6 +92,10 @@ public class TestContainerPlacement {
   private OzoneConfiguration conf;
   private PipelineManager pipelineManager;
   private NodeManager nodeManager;
+  private final Clock clock;
+  public TestContainerPlacement() {
+    this.clock = Clock.system(ZoneId.systemDefault());

Review Comment:
   `private final Clock clock` should not be added to the test, rather to the 
code being tested (`SCMNodeManager`).  It should be passed to it as a parameter 
of the constructor.  Unit test should create and pass a `TestClock`.  Other 
code should pass the system clock.
   
   Also, `SCMNodeManager` needs to be changed to use this clock.



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