From 0287c421a00eaa857c07d1f947d64a33550693e9 Mon Sep 17 00:00:00 2001 From: apnadkarni Date: Tue, 28 May 2024 11:32:39 +0000 Subject: Fix tests - need longer timer under valgrind. Close created channels. --- tests/io.test | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/tests/io.test b/tests/io.test index a41e56b..ad8d6b7 100644 --- a/tests/io.test +++ b/tests/io.test @@ -6331,7 +6331,8 @@ test io-44.6 {FileEventProc procedure: write-only non-blocking channel} -setup { set x done } }] - set token [after 10000 [namespace code { + # Note: timeout needs to be very long under valgrind + set token [after 240000 [namespace code { set x timeout }]] vwait [namespace which -variable x] @@ -6357,12 +6358,12 @@ test io-44.7 {refchan + coroutine yield error } -setup { proc initialize {chan mode} { return [list initialize finalize read watch] } - - proc read {chan count} { - } - + proc finalize args {} + proc read {chan count} {} proc watch {chan eventspec} { - after idle after 0 chan postevent $chan $eventspec + foreach event $eventspec { + after idle after 0 chan postevent $chan $event + } } } } -cleanup { @@ -6377,6 +6378,7 @@ test io-44.7 {refchan + coroutine yield error } -setup { set chan [schan::open] chan event $chan readable [list [info coroutine]] yield + close $chan set ::io-44.7-result success } [namespace current]] vwait ::io-44.7-result -- cgit v0.12