state change fix

Original commit message from CVS:
state change fix
This commit is contained in:
Thomas Vander Stichele 2005-10-26 15:03:21 +00:00
parent eb694830cb
commit bc97ab9faa
2 changed files with 10 additions and 0 deletions

View file

@ -1,3 +1,8 @@
2005-10-26 Thomas Vander Stichele <thomas at apestaart dot org>
* testsuite/test_bus.py:
fix race condition because of state thread
2005-10-26 Thomas Vander Stichele <thomas at apestaart dot org>
* testsuite/test_event.py:

View file

@ -21,6 +21,7 @@
from common import gst, unittest, TestCase
import gobject
import time
class BusSignalTest(TestCase):
def testGoodConstructor(self):
@ -68,6 +69,10 @@ class BusSignalTest(TestCase):
gst.info("set to NULL %s" % ret)
self.gccollect()
self.assertEquals(bus.__gstrefcount__, 3)
# FIXME: state change thread needs to die
while pipeline.__gstrefcount__ > 1:
gst.debug('waiting for pipeline refcount to drop')
time.sleep(0.1)
self.assertEquals(pipeline.__gstrefcount__, 1)
gst.info("about to remove the watch id")