diff --git a/README.md b/README.md index 87e806dab7c8bbf3739e4512b20b6a1a92880f78..e8bbb17097778630d73d421f95523ef781c028aa 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ Redis on Windows 2.6 prototype - For the 64 bit version, there is a limit of 2^32 objects in a structure, and a max length of 2^32 for any object - Version number now 2.6.8-pre2 to indicate prerelease and to enable changing - Version 2.6.8-pre2 fixes several failures that existed in 2.6.8-pre1. Most of these were related to handling opening and closing of non-blocking sockets. +- The unit/protocol desync test is updated to use nonblocking socket and now works on Windows ##Acknowledgements Special thanks to DuĊĦan Majkic (https://github.com/dmajkic, https://github.com/dmajkic/redis/) for his project on GitHub that gave us the opportunity to quickly learn some on the intricacies of Redis code. His project also helped us to build our prototype quickly. @@ -50,5 +51,4 @@ To run the Redis test suite requires some manual work: If a Unix shell is not installed you may see the following error message: "couldn't execute "cat": no such file or directory". ## Known issues -The are 3 consistent failures in the protocol module, having to do with receiving an error message when the client connection is closed due to bad data. These tests are disabled for now. - +None. diff --git a/tests/unit/protocol.tcl b/tests/unit/protocol.tcl index 2dcc3559a055ff4311e83687cba478577bc61a29..b0603d513eaa7849c1889f5cd52d370e9edfa991 100644 --- a/tests/unit/protocol.tcl +++ b/tests/unit/protocol.tcl @@ -60,14 +60,13 @@ start_server {tags {"protocol"}} { assert_error "*wrong*arguments*ping*" {r ping x y z} } -if { 0 == 1 } { - # not run in windows set c 0 foreach seq [list "\x00" "*\x00" "$\x00"] { incr c - after 10000 test "Protocol desync regression test #$c" { set s [socket [srv 0 host] [srv 0 port]] + # windows - set nonblocking + fconfigure $s -blocking false puts -nonewline $s $seq set payload [string repeat A 1024]"\n" set test_start [clock seconds] @@ -78,10 +77,13 @@ if { 0 == 1 } { flush $s incr payload_size [string length $payload] }]} { - set retval [gets $s] + #windows - don't read after reset + #set retval [gets $s] close $s break } else { + #windows - if data available, read line + if {[read $s 1] ne ""} { set retval [gets $s] } set elapsed [expr {[clock seconds]-$test_start}] if {$elapsed > $test_time_limit} { close $s @@ -93,7 +95,6 @@ if { 0 == 1 } { } {*Protocol error*} } unset c - } } start_server {tags {"regression"}} {