RegressionTests__SnapshotRestartTests.st
branchjv
changeset 1599 ad563876d688
parent 1597 44192c225011
child 1600 4c5ad11437f1
equal deleted inserted replaced
1598:300cd20b8c03 1599:ad563876d688
    14 	classVariableNames:''
    14 	classVariableNames:''
    15 	poolDictionaries:''
    15 	poolDictionaries:''
    16 	privateIn:SnapshotRestartTests
    16 	privateIn:SnapshotRestartTests
    17 !
    17 !
    18 
    18 
       
    19 
       
    20 !SnapshotRestartTests methodsFor:'accessing'!
       
    21 
       
    22 timeout
       
    23     "Returns a default timeout (sec) for the test.
       
    24      If nil is returned, no timeout enforced."
       
    25 
       
    26     "/ Due to some bug in I/O processing on Windows,
       
    27     "/ if there's no display connection (i.e., St/X
       
    28     "/ is running under non-interactive window station).
       
    29     "/ Thus, depending on a load of machine, 60secs may not
       
    30     "/ be enough to finish the test. In that case, increase
       
    31     "/ the limit 10 times. Sigh, what a hack!!
       
    32     "/ 
       
    33     "/ See https://swing.fit.cvut.cz/projects/stx-jv/ticket/121#ticket
       
    34 
       
    35     | timeout |
       
    36 
       
    37     timeout := super timeout.
       
    38     OperatingSystem isMSWINDOWSlike ifTrue:[ 
       
    39         "/ Try to open display first...
       
    40         Display isNil ifTrue:[ 
       
    41             Smalltalk openDisplay.
       
    42         ].
       
    43         "/ if it fails, increase the limit (sigh)"
       
    44         Display isNil ifTrue:[ 
       
    45             timeout := timeout * 10.
       
    46         ].
       
    47     ].
       
    48     ^ timeout
       
    49 
       
    50     "Created: / 03-03-2017 / 08:27:50 / jv"
       
    51     "Modified (comment): / 03-03-2017 / 21:12:16 / jv"
       
    52 ! !
    19 
    53 
    20 !SnapshotRestartTests methodsFor:'compilation'!
    54 !SnapshotRestartTests methodsFor:'compilation'!
    21 
    55 
    22 make
    56 make
    23     ^ self make:''.
    57     ^ self make:''.