aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2020-06-05 15:24:39 +1000
committerSteve Bennett <steveb@workware.net.au>2020-06-05 21:48:01 +1000
commitcd7e41a621c82833f83c3e44492083412bcd33b8 (patch)
treea99487db5e6bbf2e8ba22b25c445493e7fb3348d /tests
parente59b23873698cd9d82e3ca8f7428f7a47d49fe60 (diff)
downloadjimtcl-cd7e41a621c82833f83c3e44492083412bcd33b8.zip
jimtcl-cd7e41a621c82833f83c3e44492083412bcd33b8.tar.gz
jimtcl-cd7e41a621c82833f83c3e44492083412bcd33b8.tar.bz2
tests: allow more time for some tests
If running in a VM with very variable time Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests')
-rw-r--r--tests/event.test8
-rw-r--r--tests/signal.test6
-rw-r--r--tests/timer.test22
3 files changed, 18 insertions, 18 deletions
diff --git a/tests/event.test b/tests/event.test
index 3228684..cfadde8 100644
--- a/tests/event.test
+++ b/tests/event.test
@@ -198,14 +198,14 @@ test event-12.4 {Tcl_UpdateCmd procedure} {
foreach i [after info] {
after cancel $i
}
- after 10; update; # On Mac make sure update won't take long
- after 200 {set x x-done}
- after 400 {set y y-done}
+ after 20; update; # On Mac make sure update won't take long
+ after 400 {set x x-done}
+ after 800 {set y y-done}
after idle {set z z-done}
set x before
set y before
set z before
- after 300
+ after 600
update
list $x $y $z
} {x-done before z-done}
diff --git a/tests/signal.test b/tests/signal.test
index 63122f2..0c3479d 100644
--- a/tests/signal.test
+++ b/tests/signal.test
@@ -81,9 +81,9 @@ test signal-1.7 "clearing ignored signals" {
test signal-1.8 "try/signal" try {
signal handle ALRM
try -signal {
- alarm 0.4
+ alarm 0.8
foreach i [range 10] {
- sleep 0.1
+ sleep 0.2
}
set msg ""
} on signal {msg} {
@@ -92,7 +92,7 @@ test signal-1.8 "try/signal" try {
alarm 0
}
signal default ALRM
- list [expr {$i in {3 4 5}}] $msg
+ list [expr {$i in {2 3 4}}] $msg
} {1 SIGALRM}
test signal-1.9 {throw an ignored signal} {
diff --git a/tests/timer.test b/tests/timer.test
index a493004..2f75d28 100644
--- a/tests/timer.test
+++ b/tests/timer.test
@@ -23,13 +23,13 @@ test timer-1.1 {Tcl_CreateTimerHandler procedure} {
after cancel $i
}
set x ""
- foreach i {20 40 200 10 30} {
+ foreach i {40 80 400 20 60} {
after $i lappend x $i
}
- after 50
+ after 100
update
set x
-} {10 20 30 40}
+} {20 40 60 80}
test timer-2.1 {Tcl_DeleteTimerHandler procedure} {
foreach i [after info] {
@@ -62,21 +62,21 @@ test timer-3.2 {TimerHandlerEventProc procedure: multiple timers} {
foreach i [after info] {
after cancel $i
}
- foreach i {40 120 200} {
+ foreach i {80 240 400} {
after $i lappend x $i
}
- after 50
+ after 100
set result ""
set x ""
update
lappend result $x
- after 80
+ after 160
update
lappend result $x
- after 80
+ after 160
update
lappend result $x
-} {40 {40 120} {40 120 200}}
+} {80 {80 240} {80 240 400}}
test timer-3.3 {TimerHandlerEventProc procedure: reentrant timer deletion} {
foreach i [after info] {
after cancel $i
@@ -181,11 +181,11 @@ test timer-6.3 {Tcl_AfterCmd procedure, basics} jim {
} {1 {bad argument "gorp": must be cancel, idle, or info}}
test timer-6.4 {Tcl_AfterCmd procedure, ms argument} {
set x before
- after 80 {set x after}
- after 40
+ after 500 {set x after}
+ after 100
update
set y $x
- after 80
+ after 500
update
list $y $x
} {before after}