JAL-1889 corrected wait for consensus to be calculated
[jalview.git] / test / jalview / gui / AlignmentPanelTest.java
index 3ec8b4d..8871249 100644 (file)
@@ -69,18 +69,15 @@ public class AlignmentPanelTest
     /*
      * wait for Consensus thread to complete
      */
-    synchronized (this)
+    do
     {
-      while (af.getViewport().getConsensusSeq() == null)
+      try
+      {
+        Thread.sleep(50);
+      } catch (InterruptedException x)
       {
-        try
-        {
-          wait(50);
-        } catch (InterruptedException e)
-        {
-        }
       }
-    }
+    } while (af.getViewport().getCalcManager().isWorking());
   }
 
   /**