GrantPSpencer commented on code in PR #3038:
URL: https://github.com/apache/helix/pull/3038#discussion_r2079078504


##########
helix-core/src/test/java/org/apache/helix/common/ZkTestBase.java:
##########
@@ -192,6 +202,40 @@ private static synchronized void startZooKeeper(int i) {
     _helixZkClientMap.computeIfAbsent(zkAddress, ZkTestBase::createZkClient);
     _clusterSetupMap.computeIfAbsent(zkAddress, key -> new 
ClusterSetup(_helixZkClientMap.get(key)));
     _baseDataAccessorMap.computeIfAbsent(zkAddress, key -> new 
ZkBaseDataAccessor(_helixZkClientMap.get(key)));
+    _zkServerContainerManagerMap.computeIfAbsent(_zkServerMap.get(zkAddress), 
ZkTestBase::createContainerManager);
+  }
+
+  /**
+   * Advances the fake elapsed time used by the ContainerManager
+   * @param additionalTime time to add in milliseconds
+   */
+  public static void advanceFakeElapsedTime(long additionalTime) {
+    _fakeElapsed.addAndGet(additionalTime);
+  }
+
+  private static ContainerManager createContainerManager(ZkServer zkServer) {
+    try {
+      ZooKeeperServer zooKeeperServer = zkServer.getZooKeeperServer();
+
+      Field firstProcessorField = 
ZooKeeperServer.class.getDeclaredField("firstProcessor");

Review Comment:
   Is there a way to accomplish this without reflection? 



-- 
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: reviews-unsubscr...@helix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org
For additional commands, e-mail: reviews-h...@helix.apache.org

Reply via email to