JAL-3562 belt and braces - wait before check, and also check validity of swing component
authorJim Procter <jprocter@issues.jalview.org>
Thu, 26 Mar 2020 14:10:09 +0000 (14:10 +0000)
committerJim Procter <jprocter@issues.jalview.org>
Thu, 26 Mar 2020 14:10:09 +0000 (14:10 +0000)
test/jalview/gui/AlignmentPanelTest.java

index b7d292f..ceef079 100644 (file)
@@ -60,17 +60,18 @@ public class AlignmentPanelTest
      */
     synchronized (this)
     {
-      while (af.getViewport().isCalcInProgress()
-              || Toolkit.getDefaultToolkit().getSystemEventQueue()
-                      .peekEvent() != null)
+      do 
       {
         try
         {
-          wait(50);
+          wait(70);
         } catch (InterruptedException e)
         {
         }
-      }
+      } while (af.getViewport().isCalcInProgress()
+              || Toolkit.getDefaultToolkit().getSystemEventQueue()
+                      .peekEvent() != null
+              || !af.alignPanel.isValid());
     }
   }