diff options
author | kjnash <k.j.nash@usa.net> | 2018-03-31 15:27:52 (GMT) |
---|---|---|
committer | kjnash <k.j.nash@usa.net> | 2018-03-31 15:27:52 (GMT) |
commit | 466fd1d9304f60660938226a59e6ed8156a0d02e (patch) | |
tree | d575f2120ff170260fbb2341eaf5ae6e8f832f06 /tests/httpPipeline.test | |
parent | 441e4f6796e1e3cecba7872500d68d0ebbf3a943 (diff) | |
download | tcl-466fd1d9304f60660938226a59e6ed8156a0d02e.zip tcl-466fd1d9304f60660938226a59e6ed8156a0d02e.tar.gz tcl-466fd1d9304f60660938226a59e6ed8156a0d02e.tar.bz2 |
Chasing timeout bug: reduce client timeout to 4s in tests; more sanity checking in non-keep-alive tests; tidying; more logging in http.tcl.
Diffstat (limited to 'tests/httpPipeline.test')
-rw-r--r-- | tests/httpPipeline.test | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/tests/httpPipeline.test b/tests/httpPipeline.test index 08eb076..4823d19 100644 --- a/tests/httpPipeline.test +++ b/tests/httpPipeline.test @@ -566,10 +566,14 @@ proc ReturnTestResult {ca cb delay te} { namespace import httpTestScript::runHttpTestScript namespace import httpTestScript::cleanupHttpTestScript +namespace import httpTest::cleanupHttpTest +namespace import httpTest::logAnalyse +namespace import httpTest::setHttpTestOptions proc RunTest {header footer delay te} { set num [runHttpTestScript [ReturnTestScript $header $footer $delay $te]] set skipOverlaps 0 + set notPiped {} set notIncluded {} # -------------------------------------------------------------------------- @@ -578,23 +582,26 @@ proc RunTest {header footer delay te} { if {$header < 3} { set skipOverlaps 1 for {set i 1} {$i <= $num} {incr i} { - lappend notIncluded $i + lappend notPiped $i } } elseif {$header > 2 && $footer == 18 && $te == 1} { set skipOverlaps 1 if {$delay == 0} { # Transaction 1 is conventional. # Check that transactions 2,3,4 are cancelled. - set notIncluded {1} + set notPiped {1} + set notIncluded $notPiped } else { # Transaction 1 is conventional. # Check that transaction 2 is cancelled. # The timing of transactions 3 and 4 is uncertain. - set notIncluded {1 3 4} + set notPiped {1 3 4} + set notIncluded $notPiped } } elseif {$footer in {20 22 23 24 25}} { # Transaction 2 uses its own socket. - set notIncluded 2 + set notPiped 2 + set notIncluded $notPiped } else { } # -------------------------------------------------------------------------- @@ -602,7 +609,7 @@ proc RunTest {header footer delay te} { # -------------------------------------------------------------------------- - set Results [httpTest::LogAnalyse $num $skipOverlaps $notIncluded $notIncluded] + set Results [logAnalyse $num $skipOverlaps $notIncluded $notPiped] lassign $Results msg cleanE cleanF dirtyE dirtyF if {$msg eq {}} { set msg "Passed all sanity checks." @@ -641,8 +648,7 @@ proc RunTest {header footer delay te} { # If still obscure, uncomment #Log and ##Log lines in the http package. # ------------------------------------------------------------------------------ -set ::httpTest::testOptions(-verbose) 2 - +setHttpTestOptions -verbose 2 # ------------------------------------------------------------------------------ # (4) Define the base URLs used for testing. Each must have a query string. @@ -724,10 +730,10 @@ proc SetTestEof {test} { for {set header 1} {$header <= 4} {incr header} { if {$header == 4} { - set ::httpTest::testOptions(-dotted) 1 + setHttpTestOptions -dotted 1 set match glob } else { - set ::httpTest::testOptions(-dotted) 0 + setHttpTestOptions -dotted 0 set match exact } @@ -820,7 +826,7 @@ for {set header 1} {$header <= 4} {incr header} { http::config -pipeline 1 -postfresh 0 -repost 1 cleanupHttpTestScript SetTestEof 0 - set ::httpTest::testResults {} + cleanupHttpTest after 2000 # Wait for persistent sockets on the server to time out. } -result [ReturnTestResult $header $footer $delay $te] -match $match |