SnapshotRestartTests: temporary workaround for issue #121
Due to some bug in I/O processing on Windows, if there's no
display connection (i.e., St/X is running under non-interactive
window station). Thus, depending on a load of machine, 60secs may
not be enough to finish tests. In that case, increase the limit
10 times.
Sigh, what a hack!
See https://swing.fit.cvut.cz/projects/stx-jv/ticket/121#ticket
--- a/RegressionTests__SnapshotRestartTests.st Mon Feb 27 15:13:02 2017 +0000
+++ b/RegressionTests__SnapshotRestartTests.st Fri Mar 03 21:13:26 2017 +0000
@@ -17,6 +17,40 @@
!
+!SnapshotRestartTests methodsFor:'accessing'!
+
+timeout
+ "Returns a default timeout (sec) for the test.
+ If nil is returned, no timeout enforced."
+
+ "/ Due to some bug in I/O processing on Windows,
+ "/ if there's no display connection (i.e., St/X
+ "/ is running under non-interactive window station).
+ "/ Thus, depending on a load of machine, 60secs may not
+ "/ be enough to finish the test. In that case, increase
+ "/ the limit 10 times. Sigh, what a hack!!
+ "/
+ "/ See https://swing.fit.cvut.cz/projects/stx-jv/ticket/121#ticket
+
+ | timeout |
+
+ timeout := super timeout.
+ OperatingSystem isMSWINDOWSlike ifTrue:[
+ "/ Try to open display first...
+ Display isNil ifTrue:[
+ Smalltalk openDisplay.
+ ].
+ "/ if it fails, increase the limit (sigh)"
+ Display isNil ifTrue:[
+ timeout := timeout * 10.
+ ].
+ ].
+ ^ timeout
+
+ "Created: / 03-03-2017 / 08:27:50 / jv"
+ "Modified (comment): / 03-03-2017 / 21:12:16 / jv"
+! !
+
!SnapshotRestartTests methodsFor:'compilation'!
make