From: Jan Schmidt Date: Tue, 21 Mar 2006 14:01:07 +0000 (+0000) Subject: testsuite/: Another attempt at making the tests deterministic on the buildbots X-Git-Tag: 1.19.3~485^2~851 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=302cdc4a1d80de59fddd330925f4f47060a40ad3;p=platform%2Fupstream%2Fgstreamer.git 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 --- diff --git a/ChangeLog b/ChangeLog index 1b8e701..534dd93 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-03-21 Jan Schmidt + + * testsuite/test_ghostpad.py: + * testsuite/test_pad.py: + Another attempt at making the tests deterministic on the buildbots + 2006-03-20 Jan Schmidt * configure.ac: diff --git a/testsuite/test_ghostpad.py b/testsuite/test_ghostpad.py index d865a02..de96e32 100644 --- a/testsuite/test_ghostpad.py +++ b/testsuite/test_ghostpad.py @@ -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) diff --git a/testsuite/test_pad.py b/testsuite/test_pad.py index 0276459..407ad78 100644 --- a/testsuite/test_pad.py +++ b/testsuite/test_pad.py @@ -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)