summaryrefslogtreecommitdiffstats
path: root/tests/async.test
diff options
context:
space:
mode:
authorpooryorick <com.digitalsmarties@pooryorick.com>2018-06-07 20:59:27 (GMT)
committerpooryorick <com.digitalsmarties@pooryorick.com>2018-06-07 20:59:27 (GMT)
commit4755be8f419815dd933db195d13761b2c69ab480 (patch)
treeedaf8cb294833d4fcde8adaa8f61858d85542c33 /tests/async.test
parentc2e16d9b1f9dea745ffe57948997ba3ded2e58a5 (diff)
downloadtcl-4755be8f419815dd933db195d13761b2c69ab480.zip
tcl-4755be8f419815dd933db195d13761b2c69ab480.tar.gz
tcl-4755be8f419815dd933db195d13761b2c69ab480.tar.bz2
Give tests more time to finish since valgrind slows things down considerably.
Diffstat (limited to 'tests/async.test')
-rw-r--r--tests/async.test19
1 files changed, 12 insertions, 7 deletions
diff --git a/tests/async.test b/tests/async.test
index 6de814b..fa3aae1 100644
--- a/tests/async.test
+++ b/tests/async.test
@@ -159,10 +159,12 @@ test async-4.1 {async interrupting bytecode sequence} -constraints {
global aresult
set aresult {Async event not delivered}
testasync marklater $handle
- for {set i 0} {
- $i < 2500000 && $aresult eq "Async event not delivered"
- } {incr i} {
- nothing
+ # allow plenty of time to pass in case valgrind is running
+ set start [clock seconds]
+ while {
+ [clock seconds] - $start < 180 && $aresult eq "Async event not delivered"
+ } {
+ nothing
}
return $aresult
}} $hm
@@ -178,9 +180,12 @@ test async-4.2 {async interrupting straight bytecode sequence} -constraints {
global aresult
set aresult {Async event not delivered}
testasync marklater $handle
- for {set i 0} {
- $i < 2500000 && $aresult eq "Async event not delivered"
- } {incr i} {}
+ # allow plenty of time to pass in case valgrind is running
+ set start [clock seconds]
+ while {
+ [clock seconds] - $start < 180 && $aresult eq "Async event not delivered"
+ } {
+ }
return $aresult
}} $hm
} -result {test pattern} -cleanup {