git://source.jalview.org
/
jalview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JAL-1988 Add a sleep to file save test to give time for file to save
[jalview.git]
/
test
/
jalview
/
gui
/
QuitHandlerTest.java
diff --git
a/test/jalview/gui/QuitHandlerTest.java
b/test/jalview/gui/QuitHandlerTest.java
index
b1dab96
..
a8a7f08
100644
(file)
--- 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);
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);
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);
JvOptionPane.setMockResponse(JvOptionPane.NO_OPTION);
QResponse response = QuitHandler.getQuitResponse(true);