dlmarion commented on a change in pull request #2414:
URL: https://github.com/apache/accumulo/pull/2414#discussion_r788985592



##########
File path: 
minicluster/src/main/java/org/apache/accumulo/miniclusterImpl/MiniAccumuloClusterImpl.java
##########
@@ -624,53 +640,80 @@ private void verifyUp() throws InterruptedException, 
IOException {
           "Error starting TabletServer " + tsExpectedCount + "- instance not 
started");
     }
 
-    var zrw = getServerContext().getZooReaderWriter();
-    String rootPath = getServerContext().getZooKeeperRoot();
+    Watcher w = new Watcher() {
+      public void process(WatchedEvent event) {
+        if (event.getState() == KeeperState.Expired) {
+          log.debug("Session expired, state of current session : {}", 
event.getState());
+        }
+      }
+    };
+    try (ZooKeeper zk = new ZooKeeper(getZooKeepers(), 60000, w)) {
 
-    int tsActualCount = 0;
-    int tryCount = 0;
-    try {
-      while (tsActualCount != tsExpectedCount) {
-        tryCount++;
-        tsActualCount = 0;
-        for (String child : zrw.getChildren(rootPath + Constants.ZTSERVERS)) {
-          tsActualCount++;
-          if (zrw.getChildren(rootPath + Constants.ZTSERVERS + "/" + 
child).isEmpty())
-            log.info("TServer " + tsActualCount + " not yet present in 
ZooKeeper");
+      String secret = getSiteConfiguration().get(Property.INSTANCE_SECRET);
+
+      for (int i = 0; i < numTries; i++) {
+        if (zk.getState().equals(States.CONNECTED)) {
+          zk.addAuthInfo("digest", ("accumulo" + ":" + 
secret).getBytes(UTF_8));

Review comment:
       Are you suggesting that something already exists for this, or that I 
should create it? I see where this is done in other tests. I don't see evidence 
of a utility.




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


Reply via email to