Skip to content

Commit

Permalink
Fix unstable test case EVAL+WAITAOF (valkey-io#766)
Browse files Browse the repository at this point in the history
Test case "EVAL - Scripts do not block on waitaof" observed to fail in
e.g.
https://github.com/valkey-io/valkey/actions/runs/9860131487/job/27233756421?pr=688

It can happen that the local AOF has been written and 1 is returned here
where 0 is expected. Writing a key inside the EVAL script makes sure
there's no time to write the AOF.

Signed-off-by: Viktor Söderqvist <[email protected]>
  • Loading branch information
zuiderkwast authored and zvi-code committed Jul 14, 2024
1 parent 6e2c327 commit e9c9786
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/unit/scripting.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ start_server {tags {"scripting"}} {
} {0}

test {EVAL - Scripts do not block on waitaof} {
run_script {return redis.pcall('waitaof','0','1','0')} 0
run_script {redis.call('incr', 'x') return redis.pcall('waitaof','0','1','0')} 0
} {0 0}

test {EVAL - Scripts do not block on XREAD with BLOCK option} {
Expand Down

0 comments on commit e9c9786

Please sign in to comment.