Commit 302cdc4a authored by Jan Schmidt's avatar Jan Schmidt

testsuite/: Another attempt at making the tests deterministic on the buildbots

Original commit message from CVS:
* testsuite/test_ghostpad.py:
* testsuite/test_pad.py:
Another attempt at making the tests deterministic on the buildbots
parent b3272221
2006-03-21 Jan Schmidt <thaytan@mad.scientist.com>
* testsuite/test_ghostpad.py:
* testsuite/test_pad.py:
Another attempt at making the tests deterministic on the buildbots
2006-03-20 Jan Schmidt <thaytan@mad.scientist.com>
* configure.ac:
......
......@@ -71,11 +71,7 @@ class PipeTest(TestCase):
def tearDown(self):
gst.info("tearDown")
while True:
(ret, cur, pen) = self.pipeline.get_state()
if ret == gst.STATE_CHANGE_SUCCESS and cur == gst.STATE_NULL:
break
self.assertEquals(self.pipeline.__gstrefcount__, 1)
self.assertTrue (self.pipeline.__gstrefcount__ >= 1 and self.pipeline.__gstrefcount__ <= 2)
self.assertEquals(sys.getrefcount(self.pipeline), 3)
self.assertEquals(self.src.__gstrefcount__, 2)
self.assertEquals(sys.getrefcount(self.src), 3)
......
......@@ -264,7 +264,10 @@ class PadProbePipeTest(TestCase):
self.assertEquals(sys.getrefcount(self.fakesink), 3)
def tearDown(self):
self.assertEquals(self.pipeline.__gstrefcount__, 1)
# Refcount must be either 1 or 2, to allow for a possibly still running
# state-recalculation thread
self.assertTrue (self.pipeline.__gstrefcount__ >= 1 and self.pipeline.__gstrefcount__ <= 2)
self.assertEquals(sys.getrefcount(self.pipeline), 3)
self.assertEquals(self.fakesrc.__gstrefcount__, 2)
self.assertEquals(sys.getrefcount(self.fakesrc), 3)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment