LZD-PratyushBhatt commented on code in PR #3038:
URL: https://github.com/apache/helix/pull/3038#discussion_r2079137106


##########
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:
   Couldn't find a way, this is a protected field and is not exposed as a 
getter. I tried creating a mockProcessor
   But when a mock RequestProcessor is created, it fails to propagate deletion 
requests through ZooKeeper's processing chain. The ContainerManager identifies 
expired TTL nodes but when it submits deletion requests to the mock processor, 
these requests never reach the actual ZooKeeper database or transaction 
pipeline.



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