Skip to content

Commit

Permalink
unittest: wait for server quit (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
lexdene authored Nov 29, 2023
1 parent e45ec90 commit f8c3ae2
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 f8c3ae2

Please sign in to comment.