From 1507799b72b322cf875f0e6a287dfe69bf420a8a Mon Sep 17 00:00:00 2001 From: welch Date: Tue, 3 Nov 1998 02:00:54 +0000 Subject: Fixed timeout-related HTTP test --- tests/http.test | 12 ++++++++++-- 1 file 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 "

Query

\n
\n" foreach {key value} [split $data(query) &=] { append html "
$key
$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
\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} -- cgit v0.12