tests: fix waiting for audio recording to end

This commit is contained in:
Marek Marczykowski-Górecki 2019-04-05 03:16:39 +02:00
parent fc154fbbad
commit 75916dca5d
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -872,7 +872,7 @@ class TC_00_AppVMMixin(object):
self.loop.run_until_complete(asyncio.sleep(1))
self.loop.run_until_complete(
self.testvm1.run_for_stdio('pkill parecord'))
record.wait()
self.loop.run_until_complete(record.wait())
recorded_audio, _ = self.loop.run_until_complete(
self.testvm1.run_for_stdio('cat audio_rec.raw'))
# should be empty or silence, so check just a little fragment
@ -916,7 +916,7 @@ class TC_00_AppVMMixin(object):
self.loop.run_until_complete(asyncio.sleep(1))
self.loop.run_until_complete(
self.testvm1.run_for_stdio('pkill parecord'))
record.wait()
self.loop.run_until_complete(record.wait())
recorded_audio, _ = self.loop.run_until_complete(
self.testvm1.run_for_stdio('cat audio_rec.raw'))
# allow few bytes to be missing