summaryrefslogtreecommitdiffstats
path: root/tests/httpPipeline.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/httpPipeline.test')
-rw-r--r--tests/httpPipeline.test30
1 files changed, 27 insertions, 3 deletions
diff --git a/tests/httpPipeline.test b/tests/httpPipeline.test
index 4306149..491aae0 100644
--- a/tests/httpPipeline.test
+++ b/tests/httpPipeline.test
@@ -3,7 +3,7 @@
# Test HTTP/1.1 concurrent requests including
# queueing, pipelining and retries.
#
-# Copyright (C) 2018 Keith Nash <kjnash@users.sourceforge.net>
+# Copyright © 2018 Keith Nash <kjnash@users.sourceforge.net>
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
@@ -13,7 +13,31 @@ if {"::tcltest" ni [namespace children]} {
namespace import -force ::tcltest::*
}
-package require http 2.9
+package require http 2.10
+
+# ------------------------------------------------------------------------------
+# (0) Socket Creation in Thread, which triples the number of tests.
+# ------------------------------------------------------------------------------
+
+if {![info exists ThreadLevel]} {
+ if {[catch {package require Thread}] == 0} {
+ set ValueRange {0 1 2}
+ } else {
+ set ValueRange {0 1}
+ }
+
+ # For each value of ThreadLevel, source this file recursively in the
+ # same interpreter.
+ foreach ThreadLevel $ValueRange {
+ source [info script]
+ }
+ catch {unset ThreadLevel}
+ catch {unset ValueRange}
+ return
+}
+
+catch {puts "==== Test with ThreadLevel $ThreadLevel ===="}
+http::config -threadlevel $ThreadLevel
set sourcedir [file normalize [file dirname [info script]]]
source [file join $sourcedir httpTest.tcl]
@@ -815,7 +839,7 @@ for {set header 1} {$header <= 4} {incr header} {
# Here's the test:
- test httpPipeline-${header}.${footer}${label}-${tag} $name \
+ test httpPipeline-${header}.${footer}${label}-${tag}-$ThreadLevel $name \
-constraints $cons \
-setup [string map [list TE $te] {
# Restore default values for tests: