mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
testsuite/test_event.py: fix race condition because of state thread
Original commit message from CVS: * testsuite/test_event.py: fix race condition because of state thread
This commit is contained in:
parent
c40dff2539
commit
eb694830cb
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2005-10-26 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* testsuite/test_event.py:
|
||||
fix race condition because of state thread
|
||||
|
||||
2005-10-26 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||
|
||||
* testsuite/test_bin.py:
|
||||
|
|
|
@ -22,6 +22,8 @@
|
|||
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
from common import gst, unittest, testhelper, TestCase
|
||||
|
||||
class EventTest(TestCase):
|
||||
|
@ -35,6 +37,11 @@ class EventTest(TestCase):
|
|||
gst.debug('setting pipeline to NULL')
|
||||
self.pipeline.set_state(gst.STATE_NULL)
|
||||
gst.debug('set pipeline to NULL')
|
||||
# FIXME: wait for state change thread to die
|
||||
while self.pipeline.__gstrefcount__ > 1:
|
||||
gst.debug('waiting for self.pipeline G rc to drop to 1')
|
||||
time.sleep(0.1)
|
||||
self.assertEquals(self.pipeline.__gstrefcount__, 1)
|
||||
|
||||
del self.sink
|
||||
del self.pipeline
|
||||
|
|
Loading…
Reference in a new issue