提交 81eed0db 编写于 作者: H Henry Rawas 提交者: JonathanPickett

Modify and enable protocol desync test for windows

上级 e9555360
......@@ -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.
......@@ -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"}} {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册