summaryrefslogtreecommitdiffstats
path: root/tests/socket.test
diff options
context:
space:
mode:
authoroehhar <harald.oehlmann@elmicron.de>2014-04-02 09:54:27 (GMT)
committeroehhar <harald.oehlmann@elmicron.de>2014-04-02 09:54:27 (GMT)
commit77a33cf2ff238834a785500a7c1b75a13f90fec1 (patch)
tree8f39afbf3b2d4eb41b5a5280864cf29bba5671a3 /tests/socket.test
parent3756d27b06ad71d978de708f818dac82a3b6aacb (diff)
downloadtcl-77a33cf2ff238834a785500a7c1b75a13f90fec1.zip
tcl-77a33cf2ff238834a785500a7c1b75a13f90fec1.tar.gz
tcl-77a33cf2ff238834a785500a7c1b75a13f90fec1.tar.bz2
Test to demonstrate bug [336441ed59]. Depends on timing and will not always fire but is better than nothing. Reliable for me.
Diffstat (limited to 'tests/socket.test')
-rw-r--r--tests/socket.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/socket.test b/tests/socket.test
index 0ae5abd..218cce4 100644
--- a/tests/socket.test
+++ b/tests/socket.test
@@ -910,6 +910,22 @@ test socket-8.1 {testing -async flag on sockets} {socket} {
set z
} bye
+test socket-8.2 {testing writable event when quick failure} {socket win} {
+ # Test for bug 336441ed59 where a quick background fail was ignored
+
+ # Test only for windows as socket -async 255.255.255.255 fails directly
+ # on unix
+
+ # The following connect should fail very quickly
+ set a1 [after 2000 {set x timeout}]
+ set s [socket -async 255.255.255.255 43434]
+ fileevent $s writable {set x writable}
+ vwait x
+ catch {close $s}
+ after cancel $a1
+ set x
+} writable
+
test socket-9.1 {testing spurious events} {socket} {
set len 0
set spurious 0