diff options
author | welch <welch> | 1998-11-03 02:00:54 (GMT) |
---|---|---|
committer | welch <welch> | 1998-11-03 02:00:54 (GMT) |
commit | 1507799b72b322cf875f0e6a287dfe69bf420a8a (patch) | |
tree | 56371fe38bd782049efb02fabd6f870a9c911c22 /tests | |
parent | 581eb2ace2b296844a19fc6a4947460955b82144 (diff) | |
download | tcl-1507799b72b322cf875f0e6a287dfe69bf420a8a.zip tcl-1507799b72b322cf875f0e6a287dfe69bf420a8a.tar.gz tcl-1507799b72b322cf875f0e6a287dfe69bf420a8a.tar.bz2 |
Fixed timeout-related HTTP test
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} |