diff options
Diffstat (limited to 'tests/http.test')
-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} |