Skip to content

Commit

Permalink
add test for close_all on a receiving server
Browse files Browse the repository at this point in the history
  • Loading branch information
tshirtman committed Sep 22, 2019
1 parent 4e95826 commit 61de898
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -927,3 +927,16 @@ def callback_3000(*values):
assert checklist == ['a', 'b', 'c']

server_3000.stop() # clean up


def test_close_receiving():
osc = OSCThreadServer(encoding='utf8')
osc.listen(default=True)
port = osc.getaddress()[1]

# this should keep the server busy receiving for a while
for i in range(1000):
send_message(b'/flood', [b't' * 60000], 'localhost', port)

# surprise, let's stop it asap!
osc.stop_all()

0 comments on commit 61de898

Please sign in to comment.