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 | 735ca3d3a8dcc3e70c02259043f55853c0ac909c (patch) | |
| tree | 21481eaec1215de31c1f07b7bb2173959664dedc | |
| parent | 72396a1929d28c0d4eedf4a08a33c634a93a5172 (diff) | |
| download | tcl-735ca3d3a8dcc3e70c02259043f55853c0ac909c.zip tcl-735ca3d3a8dcc3e70c02259043f55853c0ac909c.tar.gz tcl-735ca3d3a8dcc3e70c02259043f55853c0ac909c.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" |
