Skip to content

Commit

Permalink
improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
oranagra committed Aug 5, 2023
1 parent 80a50a2 commit b059201
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/unit/scripting.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -1114,14 +1114,19 @@ start_server {tags {"scripting"}} {

test {Timedout scripts and unblocked command} {
# make sure a command that's allowed during BUSY doens't trigger an unblocked command

# enable AOF to also expose an assertion if the bug would happen
r flushall
r config set appendonly yes

# create clients, and set one to block waiting for key 'x'
set rd [redis_deferring_client]
set rd2 [redis_deferring_client]
set r3 [redis_client]
r del x
$rd2 blpop x 0
wait_for_blocked_clients_count 1

# allow the script to use client list
# hack: allow the script to use client list command so that we can control when it aborts
r DEBUG set-disable-deny-scripts 1
r config set lua-time-limit 10
run_script_on_connection $rd {
Expand Down

0 comments on commit b059201

Please sign in to comment.