summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authormax <max@tclers.tk>2011-06-06 15:07:23 (GMT)
committermax <max@tclers.tk>2011-06-06 15:07:23 (GMT)
commit0618824f488fb5b0c72f4a9c5369f60f6193a662 (patch)
treef38a2b5c3b5c05782171fb7bbe4a02a0315e6916 /tests
parent216999c8c3ee1bd0155a844cc100022d5aeaedca (diff)
downloadtcl-0618824f488fb5b0c72f4a9c5369f60f6193a662.zip
tcl-0618824f488fb5b0c72f4a9c5369f60f6193a662.tar.gz
tcl-0618824f488fb5b0c72f4a9c5369f60f6193a662.tar.bz2
* Don't use port 0 for test 14.2 as it fails in different ways on Linux and NetBSD.
* Unify channel name creation. * Prevent error messages from appearing twice. * Double the measured latency in socket.test to be on the safe side.
Diffstat (limited to 'tests')
-rw-r--r--tests/socket.test4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/socket.test b/tests/socket.test
index b121022..39dc8de 100644
--- a/tests/socket.test
+++ b/tests/socket.test
@@ -85,7 +85,7 @@ puts $s2 test1; gets $s1
puts $s2 test2; gets $s1
close $s1; close $s2
set t2 [clock milliseconds]
-set latency [expr {$t2-$t1}]
+set latency [expr {($t2-$t1)*2}]; # doubled as a safety margin
unset t1 t2 s1 s2 server
# If remoteServerIP or remoteServerPort are not set, check in the environment
@@ -1768,7 +1768,7 @@ test socket-14.1 {[socket -async] fileevent while still connecting} \
test socket-14.2 {[socket -async] fileevent connection refused} \
-constraints [list socket supported_any] \
-body {
- set client [socket -async localhost 0]
+ set client [socket -async localhost [randport]]
fileevent $client writable {set x [fconfigure $client -error]}
set after [after 1000 {set x timeout}]
vwait x