keith-turner commented on code in PR #5768:
URL: https://github.com/apache/accumulo/pull/5768#discussion_r2240596079


##########
test/src/main/java/org/apache/accumulo/test/upgrade/UpgradeIT.java:
##########
@@ -139,14 +167,30 @@ public void testUpgradeManagerFailure() throws Exception {
     ServerContext ctx = getCluster().getServerContext();
     UpgradeUtilIT.downgradePersistentVersion(ctx);
 
-    List<String> args = new ArrayList<>();
-    args.add("--props");
-    args.add(getCluster().getAccumuloPropertiesPath());
-    try (TestManager mgr = new TestManager(args.toArray(new String[0]))) {
-      IllegalStateException ise = assertThrows(IllegalStateException.class, () 
-> mgr.runServer());
-      assertTrue(ise.getMessage().equals("Upgrade not started, " + 
Constants.ZUPGRADE_PROGRESS
-          + " node does not exist. Did you run 'accumulo upgrade --start'?"));
-    }
+    final AtomicReference<Throwable> err = new AtomicReference<>();
+    Thread testMgrThread = new Thread() {
+      @Override
+      public void run() {
+        try {
+          List<String> args = new ArrayList<>();
+          args.add("--props");
+          args.add(getCluster().getAccumuloPropertiesPath());
+          TestManager mgr = new TestManager(args.toArray(new String[0]));
+          mgr.runServer();

Review Comment:
   The test was failing before because something was deleting the manager lock 
and that caused the process to halt.  I think the thread running this test 
thread was fine.  I changed TestManager constructor back to the following 
locally `super(new ConfigOpts(), (conf) -> getServerContext(), args)` and ran 
these updated test and it still fails because something halts the process.  So 
it seems that making that change to server context fixes the test, but I do not 
understand why.



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