Test: regression for issue #1549.

It was verified that reverting the commit that fixes the bug, the test
no longer passes.
This commit is contained in:
antirez 2014-02-13 12:25:44 +01:00
parent 21e6b0fbe9
commit f2bdf601be

View File

@ -417,5 +417,17 @@ start_server {tags {"scripting repl"}} {
}
set res
} {a 1}
test {EVALSHA replication when first call is readonly} {
r del x
r eval {if tonumber(KEYS[1]) > 0 then redis.call('incr', 'x') end} 1 0
r evalsha 38fe3ddf5284a1d48f37f824b4c4e826879f3cb9 1 0
r evalsha 38fe3ddf5284a1d48f37f824b4c4e826879f3cb9 1 1
wait_for_condition 50 100 {
[r -1 get x] eq {1}
} else {
fail "Expected 1 in x, but value is '[r -1 get x]'"
}
}
}
}