git://source.jalview.org
/
jalview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
15a605b
)
JAL-1988 Add a sleep to file save test to give time for file to save
author
Ben Soares
<b.soares@dundee.ac.uk>
Thu, 26 Jan 2023 11:49:36 +0000
(11:49 +0000)
committer
Ben Soares
<b.soares@dundee.ac.uk>
Thu, 26 Jan 2023 11:49:36 +0000
(11:49 +0000)
test/jalview/gui/QuitHandlerTest.java
patch
|
blob
|
history
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);