summaryrefslogtreecommitdiffstats
path: root/tests/socket.test
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)
commita7f1ab1afd109c2c02de573a66aaab15bfbdeab1 (patch)
treef38a2b5c3b5c05782171fb7bbe4a02a0315e6916 /tests/socket.test
parentb8ee85e7eb1b906ac79f4fae165c4e8cf0e9faf4 (diff)
downloadtcl-a7f1ab1afd109c2c02de573a66aaab15bfbdeab1.zip
tcl-a7f1ab1afd109c2c02de573a66aaab15bfbdeab1.tar.gz
tcl-a7f1ab1afd109c2c02de573a66aaab15bfbdeab1.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/socket.test')
-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