diff options
author | dgp <dgp@users.sourceforge.net> | 2017-08-03 14:39:59 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-08-03 14:39:59 (GMT) |
commit | c5d2a041f09785727fad67a457ca2b28aecefe82 (patch) | |
tree | 21481eaec1215de31c1f07b7bb2173959664dedc | |
parent | 07fa017898edeacecf2cf454f053948cc7263d0d (diff) | |
download | tcl-c5d2a041f09785727fad67a457ca2b28aecefe82.zip tcl-c5d2a041f09785727fad67a457ca2b28aecefe82.tar.gz tcl-c5d2a041f09785727fad67a457ca2b28aecefe82.tar.bz2 |
Improved test http-4.16.
-rw-r--r-- | tests/http.test | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tests/http.test b/tests/http.test index c2d2fe8..5a00cd5 100644 --- a/tests/http.test +++ b/tests/http.test @@ -599,14 +599,20 @@ test http-4.15 {http::Event} -body { } -cleanup { catch {http::cleanup $token} } -returnCodes 1 -match glob -result "couldn't open socket*" -test http-4.16 {Leak with Close vs Keepalive (bug [6ca52aec14]} -body { +test http-4.16 {Leak with Close vs Keepalive (bug [6ca52aec14]} -setup { + proc list-difference {l1 l2} { + lmap item $l2 {if {$item in $l1} continue; set item} + } +} -body { set before [chan names] set token [http::geturl $url -headers {X-Connection keep-alive}] http::cleanup $token update - set after [chan names] - expr {$before eq $after} -} -result 1 + # Compute what channels have been unexpectedly leaked past cleanup + list-difference $before [chan names] +} -cleanup { + rename list-difference {} +} -result {} test http-5.1 {http::formatQuery} { http::formatQuery name1 value1 name2 "value two" |