From eb694830cbc9093aa1f4868ec499ebca6c69c2a1 Mon Sep 17 00:00:00 2001 From: Thomas Vander Stichele Date: Wed, 26 Oct 2005 14:53:28 +0000 Subject: [PATCH] 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 --- ChangeLog | 5 +++++ testsuite/test_event.py | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 356e237..9d289d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2005-10-26 Thomas Vander Stichele + * testsuite/test_event.py: + fix race condition because of state thread + +2005-10-26 Thomas Vander Stichele + * testsuite/test_bin.py: fix race condition because of state thread diff --git a/testsuite/test_event.py b/testsuite/test_event.py index ca8a73d..3341857 100644 --- a/testsuite/test_event.py +++ b/testsuite/test_event.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 -- 2.7.4