with recent changes these tests are working on windows
This commit is contained in:
@@ -5,23 +5,22 @@ start_server {tags {"introspection"}} {
|
||||
r client list
|
||||
} {*addr=*:* fd=* age=* idle=* flags=N db=9 sub=0 psub=0 multi=-1 qbuf=0 qbuf-free=* obl=0 oll=0 omem=0 events=r cmd=client*}
|
||||
|
||||
# Windows: temporarily disabling this test because it occasionally never finishes
|
||||
# test {MONITOR can log executed commands} {
|
||||
# set rd [redis_deferring_client]
|
||||
# $rd monitor
|
||||
# r set foo bar
|
||||
# r get foo
|
||||
# list [$rd read] [$rd read] [$rd read]
|
||||
# } {*OK*"set" "foo"*"get" "foo"*}
|
||||
test {MONITOR can log executed commands} {
|
||||
set rd [redis_deferring_client]
|
||||
$rd monitor
|
||||
r set foo bar
|
||||
r get foo
|
||||
list [$rd read] [$rd read] [$rd read]
|
||||
} {*OK*"set" "foo"*"get" "foo"*}
|
||||
|
||||
# test {MONITOR can log commands issued by the scripting engine} {
|
||||
# set rd [redis_deferring_client]
|
||||
# $rd monitor
|
||||
# r eval {redis.call('set',KEYS[1],ARGV[1])} 1 foo bar
|
||||
# $rd read ;# Discard the OK
|
||||
# assert_match {*eval*} [$rd read]
|
||||
# assert_match {*lua*"set"*"foo"*"bar"*} [$rd read]
|
||||
# }
|
||||
test {MONITOR can log commands issued by the scripting engine} {
|
||||
set rd [redis_deferring_client]
|
||||
$rd monitor
|
||||
r eval {redis.call('set',KEYS[1],ARGV[1])} 1 foo bar
|
||||
$rd read ;# Discard the OK
|
||||
assert_match {*eval*} [$rd read]
|
||||
assert_match {*lua*"set"*"foo"*"bar"*} [$rd read]
|
||||
}
|
||||
|
||||
test {CLIENT GETNAME should return NIL if name is not assigned} {
|
||||
r client getname
|
||||
@@ -47,20 +46,16 @@ start_server {tags {"introspection"}} {
|
||||
} {*name=someothername*}
|
||||
|
||||
test {After CLIENT SETNAME, connection can still be closed} {
|
||||
if { [string match {*win32*} [platform::identify]] == 0 } {
|
||||
set rd [redis_deferring_client]
|
||||
$rd client setname foobar
|
||||
assert_equal [$rd read] "OK"
|
||||
assert_match {*foobar*} [r client list]
|
||||
$rd close
|
||||
# Now the client should no longer be listed
|
||||
wait_for_condition 50 100 {
|
||||
[string match {*foobar*} [r client list]] == 0
|
||||
} else {
|
||||
fail "Client still listed in CLIENT LIST after SETNAME."
|
||||
}
|
||||
set rd [redis_deferring_client]
|
||||
$rd client setname foobar
|
||||
assert_equal [$rd read] "OK"
|
||||
assert_match {*foobar*} [r client list]
|
||||
$rd close
|
||||
# Now the client should no longer be listed
|
||||
wait_for_condition 50 100 {
|
||||
[string match {*foobar*} [r client list]] == 0
|
||||
} else {
|
||||
fail "Win32: bypassing broken unit test (windows version of tclsh8.5 not closing socket)"
|
||||
fail "Client still listed in CLIENT LIST after SETNAME."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user