From: Jim Procter Date: Thu, 26 Mar 2020 14:10:09 +0000 (+0000) Subject: JAL-3562 belt and braces - wait before check, and also check validity of swing component X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=97d3b07b7a240f02fc634e35d85206f22f1743e5;p=jalview.git JAL-3562 belt and braces - wait before check, and also check validity of swing component --- diff --git a/test/jalview/gui/AlignmentPanelTest.java b/test/jalview/gui/AlignmentPanelTest.java index b7d292f..ceef079 100644 --- a/test/jalview/gui/AlignmentPanelTest.java +++ b/test/jalview/gui/AlignmentPanelTest.java @@ -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()); } }