Skip to content

Commit

Permalink
#1773 don't run for too long, just wait for a few packets
Browse files Browse the repository at this point in the history
git-svn-id: https://xpra.org/svn/Xpra/trunk@23171 3bb7dfac-3a0b-4e04-842a-767bc560f471
  • Loading branch information
totaam committed Jul 17, 2019
1 parent 1e46fb3 commit ee4d9ad
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/unittests/unit/client/mixins/audioclient_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,21 @@ def test_audio(self):
def stop():
self.mixin.stop_sending_sound()
self.stop()
def check_packets():
if len(self.packets)<5:
return True
self.mixin.stop_sending_sound()
self.main_loop.quit()
return False
self.glib.timeout_add(100, check_packets)
self.glib.timeout_add(5000, stop)
#self.debug_all()
x.parse_server_capabilities()
self.main_loop.run()
assert len(self.packets)>2
from xpra.os_util import get_util_logger
for p in self.packets:
get_util_logger().info("%s", p)
self.verify_packet(0, ("sound-data", ))
assert self.packets[0][3].get("start-of-stream"), "start-of-stream not found"
self.verify_packet(-1, ("sound-data", ))
Expand Down

0 comments on commit ee4d9ad

Please sign in to comment.