a fix to get the integration tests working again, and added warnings about tests bypassed for Win32
This commit is contained in:
+2
-2
@@ -393,7 +393,7 @@ int redis_poll_impl(struct pollfd *fds, nfds_t nfds, int timeout) {
|
||||
int redis_getsockopt_impl(int sockfd, int level, int optname, void *optval, socklen_t *optlen) {
|
||||
try {
|
||||
SOCKET s = RFDMap::getInstance().lookupSocket(sockfd);
|
||||
if( s != INVALID_SOCKET ) {
|
||||
if( s == INVALID_SOCKET ) {
|
||||
errno = EBADF;
|
||||
return -1;
|
||||
}
|
||||
@@ -409,7 +409,7 @@ int redis_getsockopt_impl(int sockfd, int level, int optname, void *optval, sock
|
||||
int redis_connect_impl(int sockfd, const struct sockaddr *addr, size_t addrlen) {
|
||||
try {
|
||||
SOCKET s = RFDMap::getInstance().lookupSocket(sockfd);
|
||||
if( s != INVALID_SOCKET ) {
|
||||
if( s == INVALID_SOCKET ) {
|
||||
errno = EBADF;
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package require platform 1.0.4
|
||||
|
||||
set defaults { appendonly {yes} appendfilename {appendonly.aof} }
|
||||
set server_path [tmpdir server.aof]
|
||||
set aof_path "$server_path/appendonly.aof"
|
||||
@@ -80,11 +82,13 @@ tags {"aof"} {
|
||||
assert_match "*not valid*" $result
|
||||
}
|
||||
|
||||
# failing on Win32
|
||||
if { [string match {*win32*} [platform::identify]] == 0 } {
|
||||
test "Short read: Utility should be able to fix the AOF" {
|
||||
set result [exec src/redis-check-aof --fix $aof_path << "y\n"]
|
||||
assert_match "*Successfully truncated AOF*" $result
|
||||
}
|
||||
|
||||
|
||||
## Test that the server can be started using the truncated AOF
|
||||
start_server_aof [list dir $server_path] {
|
||||
test "Fixed AOF: Server should have been started" {
|
||||
@@ -97,6 +101,9 @@ tags {"aof"} {
|
||||
assert_equal "" [$client get bar]
|
||||
}
|
||||
}
|
||||
} else {
|
||||
puts "Win32: bypassing broken unit tests"
|
||||
}
|
||||
|
||||
## Test that SPOP (that modifies the client its argc/argv) is correctly free'd
|
||||
create_aof {
|
||||
|
||||
+8
-12
@@ -11,18 +11,6 @@ source tests/support/tmpfile.tcl
|
||||
source tests/support/test.tcl
|
||||
source tests/support/util.tcl
|
||||
|
||||
# integration/replication
|
||||
# integration/replication-2
|
||||
# integration/replication-3
|
||||
# integration/replication-4
|
||||
# integration/aof
|
||||
# integration/rdb
|
||||
|
||||
# unit/multi
|
||||
|
||||
# unit/aofrw
|
||||
|
||||
|
||||
set ::all_tests {
|
||||
unit/printver
|
||||
unit/auth
|
||||
@@ -37,7 +25,15 @@ set ::all_tests {
|
||||
unit/sort
|
||||
unit/expire
|
||||
unit/other
|
||||
unit/multi
|
||||
unit/quit
|
||||
unit/aofrw
|
||||
integration/replication
|
||||
integration/replication-2
|
||||
integration/replication-3
|
||||
integration/replication-4
|
||||
integration/aof
|
||||
integration/rdb
|
||||
integration/convert-zipmap-hash-on-load
|
||||
unit/pubsub
|
||||
unit/slowlog
|
||||
|
||||
@@ -2272,8 +2272,8 @@ start_server {tags {"other"}} {
|
||||
|
||||
# On Windows there are issues with expiring keys and the bgsave/flushload mechanism.
|
||||
# It looks like a race condition.
|
||||
if { [string match {*win32*} [platform::identify]] == 0 } {
|
||||
test {BGSAVE expires} {
|
||||
if { [string match {*win32*} [platform::identify]] == 0 } {
|
||||
waitForBgsave r
|
||||
r flushdb
|
||||
r set x 10
|
||||
@@ -2287,9 +2287,13 @@ if { [string match {*win32*} [platform::identify]] == 0 } {
|
||||
set e1 [expr {$ttl > 900 && $ttl <= 1000}]
|
||||
assert_equal $e1 1
|
||||
r flushdb
|
||||
} else {
|
||||
fail "Win32: bypassing broken unit test"
|
||||
}
|
||||
} {OK}
|
||||
|
||||
test {BGSAVE expires stress} {
|
||||
if { [string match {*win32*} [platform::identify]] == 0 } {
|
||||
waitForBgsave r
|
||||
r flushdb
|
||||
r save
|
||||
@@ -2305,7 +2309,9 @@ if { [string match {*win32*} [platform::identify]] == 0 } {
|
||||
after 200
|
||||
}
|
||||
r flushdb
|
||||
} else {
|
||||
fail "Win32: bypassing broken unit test"
|
||||
}
|
||||
} {OK}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+8
-2
@@ -1,3 +1,5 @@
|
||||
package require platform 1.0.4
|
||||
|
||||
start_server {tags {"dump"}} {
|
||||
test {DUMP / RESTORE are able to serialize / unserialize a simple key} {
|
||||
r set foo bar
|
||||
@@ -67,7 +69,7 @@ start_server {tags {"dump"}} {
|
||||
}
|
||||
|
||||
test {MIGRATE can correctly transfer large values} {
|
||||
# win - works single pass, but fails with full unit test pass. Probably a timing issue.
|
||||
if { [string match {*win32*} [platform::identify]] == 0 } {
|
||||
set first [srv 0 client]
|
||||
r del key
|
||||
for {set j 0} {$j < 5000} {incr j} {
|
||||
@@ -90,7 +92,11 @@ start_server {tags {"dump"}} {
|
||||
assert {[$second ttl key] == -1}
|
||||
assert {[$second llen key] == 5000*20}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
fail "Win32: bypassing broken unit test"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
test {MIGRATE can correctly transfer hashes} {
|
||||
set first [srv 0 client]
|
||||
|
||||
@@ -47,9 +47,7 @@ start_server {tags {"introspection"}} {
|
||||
} {*name=someothername*}
|
||||
|
||||
test {After CLIENT SETNAME, connection can still be closed} {
|
||||
if { [string match {*win32*} [platform::identify]] == 1 } {
|
||||
puts "Known issue: windows version of tclsh8.5 not closing socket"
|
||||
} else {
|
||||
if { [string match {*win32*} [platform::identify]] == 0 } {
|
||||
set rd [redis_deferring_client]
|
||||
$rd client setname foobar
|
||||
assert_equal [$rd read] "OK"
|
||||
@@ -61,6 +59,8 @@ start_server {tags {"introspection"}} {
|
||||
} else {
|
||||
fail "Client still listed in CLIENT LIST after SETNAME."
|
||||
}
|
||||
} else {
|
||||
fail "Win32: bypassing broken unit test (windows version of tclsh8.5 not closing socket)"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
package require platform 1.0.4
|
||||
|
||||
start_server {tags {"multi"}} {
|
||||
test {MUTLI / EXEC basics} {
|
||||
r del mylist
|
||||
@@ -267,7 +269,9 @@ start_server {tags {"multi"}} {
|
||||
close_replication_stream $repl
|
||||
}
|
||||
|
||||
|
||||
test {MULTI / EXEC is propagated correctly (empty transaction)} {
|
||||
if { [string match {*win32*} [platform::identify]] == 0 } {
|
||||
set repl [attach_to_replication_stream]
|
||||
r multi
|
||||
r exec
|
||||
@@ -277,9 +281,13 @@ start_server {tags {"multi"}} {
|
||||
{set foo bar}
|
||||
}
|
||||
close_replication_stream $repl
|
||||
} else {
|
||||
fail "Win32: bypassing broken unit test"
|
||||
}
|
||||
}
|
||||
|
||||
test {MULTI / EXEC is propagated correctly (read-only commands)} {
|
||||
if { [string match {*win32*} [platform::identify]] == 0 } {
|
||||
r set foo value1
|
||||
set repl [attach_to_replication_stream]
|
||||
r multi
|
||||
@@ -291,9 +299,13 @@ start_server {tags {"multi"}} {
|
||||
{set foo value2}
|
||||
}
|
||||
close_replication_stream $repl
|
||||
} else {
|
||||
fail "Win32: bypassing broken unit test"
|
||||
}
|
||||
}
|
||||
|
||||
test {MULTI / EXEC is propagated correctly (write command, no effect)} {
|
||||
if { [string match {*win32*} [platform::identify]] == 0 } {
|
||||
r del bar foo bar
|
||||
set repl [attach_to_replication_stream]
|
||||
r multi
|
||||
@@ -305,5 +317,9 @@ start_server {tags {"multi"}} {
|
||||
{exec}
|
||||
}
|
||||
close_replication_stream $repl
|
||||
} else {
|
||||
fail "Win32: bypassing broken unit test"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user