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 ee5c030 commit 91391d8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: install
run: pip install .[dev,ci]
- name: test
run: python -m pytest --reruns 5 tests/ --cov oscpy/ --cov-branch
run: python -m pytest --reruns 2 tests/ --cov oscpy/ --cov-branch
- name: coveralls
run: python -m coveralls
env:
Expand Down
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(5000):
send_message(b'/flood', [b't' * 60000], 'localhost', port)

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

0 comments on commit 91391d8

Please sign in to comment.