From f205bfec471719e5735229689cab62e9b675ee2a Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Thu, 26 Jan 2023 11:49:36 +0000 Subject: [PATCH] JAL-1988 Add a sleep to file save test to give time for file to save --- test/jalview/gui/QuitHandlerTest.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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); -- 1.7.10.2