From: Ben Soares Date: Thu, 26 Jan 2023 11:49:36 +0000 (+0000) Subject: JAL-1988 Add a sleep to file save test to give time for file to save X-Git-Tag: Release_2_11_3_0~23^2~8^2~2 X-Git-Url: http://source.jalview.org/gitweb/?p=jalview.git;a=commitdiff_plain;h=f205bfec471719e5735229689cab62e9b675ee2a JAL-1988 Add a sleep to file save test to give time for file to save --- diff --git a/test/jalview/gui/QuitHandlerTest.java b/test/jalview/gui/QuitHandlerTest.java index b1dab96..a8a7f08 100644 --- a/test/jalview/gui/QuitHandlerTest.java +++ b/test/jalview/gui/QuitHandlerTest.java @@ -170,11 +170,15 @@ public class QuitHandlerTest viewport.setSavedUpToDate(false); Jalview2XML.setStateSavedUpToDate(false); - // no hanging around needed here + // don't want to hang around here Cache.setProperty("DEBUG_DELAY_SAVE", "false"); af.saveAlignment(saveProjectFile, FileFormat.Jalview); - // this is only a two button dialog [Quit] [Cancel] so use NO_OPTION + Thread.sleep(1000); // give time for file to save + + // this is only a two button dialog [Quit] [Cancel] so use NO_OPTION (to + // mean [CANCEL] -- file should already be saved so this doesn't happen and + // we get a QUIT response) JvOptionPane.setMockResponse(JvOptionPane.NO_OPTION); QResponse response = QuitHandler.getQuitResponse(true);