diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2005-10-26 14:29:58 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2005-10-26 14:29:58 +0000 |
commit | c40dff253986c46e4641e0fcdfc055ed5d4d4a00 (patch) | |
tree | 1363073a7ecbcc9065cc75cf833e4955023443bf | |
parent | 015db96c26db2677e77d7b9bae153dcb0ce5c94e (diff) |
testsuite/test_bin.py: fix race condition because of state thread
Original commit message from CVS:
* testsuite/test_bin.py:
fix race condition because of state thread
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | testsuite/test_bin.py | 8 |
2 files changed, 12 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2005-10-26 Thomas Vander Stichele <thomas at apestaart dot org> + + * testsuite/test_bin.py: + fix race condition because of state thread + 2005-10-24 Thomas Vander Stichele <thomas at apestaart dot org> * configure.ac: diff --git a/testsuite/test_bin.py b/testsuite/test_bin.py index 16437ed..1857790 100644 --- a/testsuite/test_bin.py +++ b/testsuite/test_bin.py @@ -21,9 +21,11 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -import sys from common import gobject, gst, unittest, TestCase +import sys +import time + # see # http://www.sicem.biz/personal/lgs/docs/gobject-python/gobject-tutorial.html class MyBin(gst.Bin): @@ -136,6 +138,10 @@ class Preroll(TestCase): self.bin = gst.Bin('bin') def tearDown(self): + # FIXME: wait for state change thread to settle down + while self.bin.__gstrefcount__ > 1: + time.sleep(0.1) + self.assertEquals(self.bin.__gstrefcount__, 1) del self.bin TestCase.tearDown(self) |