diff options
author | welch <welch@noemail.net> | 1998-11-03 02:00:54 (GMT) |
---|---|---|
committer | welch <welch@noemail.net> | 1998-11-03 02:00:54 (GMT) |
commit | be904d29b99c51d25ad9a0dcb1bfd4596079825c (patch) | |
tree | 56371fe38bd782049efb02fabd6f870a9c911c22 /tests | |
parent | b43473c69c7ce101495be47ef4f39e35194fbec9 (diff) | |
download | tcl-be904d29b99c51d25ad9a0dcb1bfd4596079825c.zip tcl-be904d29b99c51d25ad9a0dcb1bfd4596079825c.tar.gz tcl-be904d29b99c51d25ad9a0dcb1bfd4596079825c.tar.bz2 |
Fixed timeout-related HTTP test
FossilOrigin-Name: 6fe3862eab727c4625e3556528010d792fd94774
Diffstat (limited to 'tests')
-rw-r--r-- | tests/http.test | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/http.test b/tests/http.test index 2403c33..c4ddbf8 100644 --- a/tests/http.test +++ b/tests/http.test @@ -11,7 +11,7 @@ # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # # -# RCS: @(#) $Id: http.test,v 1.2 1998/09/14 18:40:09 stanton Exp $ +# RCS: @(#) $Id: http.test,v 1.3 1998/11/03 02:00:54 welch Exp $ if {[string compare test [info procs test]] == 1} then {source defs} @@ -145,6 +145,14 @@ proc httpdRespond { sock } { append html "<h2>Query</h2>\n<dl>\n" foreach {key value} [split $data(query) &=] { append html "<dt>$key<dd>$value\n" + if {[string compare $key timeout] == 0} { + # Simulate a timeout by not responding, + # but clean up our socket later. + + after 50 [list httpdSockDone $sock] + httpd_log $sock Noresponse "" + return + } } append html </dl>\n } @@ -375,7 +383,7 @@ test http-4.11 {http::Event} { http::status $token } {reset} test http-4.12 {http::Event} { - set token [http::geturl $url -timeout 1 -command {#}] + set token [http::geturl $url?timeout=10 -timeout 1 -command {#}] http::wait $token http::status $token } {timeout} |