JAL-3562 paranoid print out of tested values during wait suspect a platform issue... patch/JAL-3562_fixAlignmentPanelTest
authorJim Procter <jprocter@issues.jalview.org>
Fri, 27 Mar 2020 10:05:35 +0000 (10:05 +0000)
committerJim Procter <jprocter@issues.jalview.org>
Fri, 27 Mar 2020 10:05:35 +0000 (10:05 +0000)
test/jalview/gui/AlignmentPanelTest.java

index d0be072..a2107b7 100644 (file)
@@ -64,14 +64,30 @@ public class AlignmentPanelTest
       {
         try
         {
-          wait(270);
+          int lw = -1, lwnow = -1;
+          for (int q = 0; q < 50; q++)
+          {
+            int w = af.alignPanel.getVisibleIdWidth(true);
+            int wnow = af.alignPanel.getIdPanel().getWidth();
+            if (lw != w || wnow != lwnow)
+            {
+              System.out.println("Width " + w + " idpanel width " + wnow);
+            }
+            else
+            {
+              wait(1);
+            }
+            lw = w;
+            lwnow = wnow;
+          }
         } catch (InterruptedException e)
         {
         }
       } while (af.getViewport().isCalcInProgress()
-              || Toolkit.getDefaultToolkit().getSystemEventQueue()
-                      .peekEvent() != null
-              || !af.alignPanel.isValid());
+              || (Toolkit.getDefaultToolkit().getSystemEventQueue()
+                      .peekEvent() != null)
+              || !af.alignPanel.isValid()
+              || af.getViewport().getConsensusSeq() == null);
     }
   }