From 97d3b07b7a240f02fc634e35d85206f22f1743e5 Mon Sep 17 00:00:00 2001 From: Jim Procter Date: Thu, 26 Mar 2020 14:10:09 +0000 Subject: [PATCH] JAL-3562 belt and braces - wait before check, and also check validity of swing component --- test/jalview/gui/AlignmentPanelTest.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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()); } } -- 1.7.10.2