Skip to content

Commit

Permalink
unittest: wait for server quit
Browse files Browse the repository at this point in the history
  • Loading branch information
lexdene committed Nov 29, 2023
1 parent fbf4acf commit e749b05
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/shabby/reconnect_delay.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ def test_hard_server_error():

assert mc.set('foo', 1)
memcached_server_ctl('stop', normal_port)

# I dont know why,
# but the server is still connectable after stop.
# add a sleep to wait for the server quit
time.sleep(3)

assert not mc.set('foo', 1) # fail
memcached_server_ctl('start', normal_port)
assert not mc.set('foo', 1) # still fail
Expand Down

0 comments on commit e749b05

Please sign in to comment.