From: Jim Procter Date: Thu, 26 Mar 2020 13:52:27 +0000 (+0000) Subject: JAL-3562 wait until no more events on the queue as well X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=8ffa4b8a6aa12e528bf19a62df99d3fa4acbcefb;p=jalview.git JAL-3562 wait until no more events on the queue as well --- diff --git a/test/jalview/gui/AlignmentPanelTest.java b/test/jalview/gui/AlignmentPanelTest.java index 1048d1b..b7d292f 100644 --- a/test/jalview/gui/AlignmentPanelTest.java +++ b/test/jalview/gui/AlignmentPanelTest.java @@ -35,6 +35,7 @@ import jalview.viewmodel.ViewportRanges; import java.awt.Dimension; import java.awt.Font; import java.awt.FontMetrics; +import java.awt.Toolkit; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -59,7 +60,9 @@ public class AlignmentPanelTest */ synchronized (this) { - while (af.getViewport().isCalcInProgress()) + while (af.getViewport().isCalcInProgress() + || Toolkit.getDefaultToolkit().getSystemEventQueue() + .peekEvent() != null) { try {