mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 05:06:17 +00:00
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
This commit is contained in:
parent
015db96c26
commit
c40dff2539
2 changed files with 12 additions and 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>
|
2005-10-24 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
* configure.ac:
|
* configure.ac:
|
||||||
|
|
|
@ -21,9 +21,11 @@
|
||||||
# License along with this library; if not, write to the Free Software
|
# License along with this library; if not, write to the Free Software
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
|
||||||
import sys
|
|
||||||
from common import gobject, gst, unittest, TestCase
|
from common import gobject, gst, unittest, TestCase
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
|
||||||
# see
|
# see
|
||||||
# http://www.sicem.biz/personal/lgs/docs/gobject-python/gobject-tutorial.html
|
# http://www.sicem.biz/personal/lgs/docs/gobject-python/gobject-tutorial.html
|
||||||
class MyBin(gst.Bin):
|
class MyBin(gst.Bin):
|
||||||
|
@ -136,6 +138,10 @@ class Preroll(TestCase):
|
||||||
self.bin = gst.Bin('bin')
|
self.bin = gst.Bin('bin')
|
||||||
|
|
||||||
def tearDown(self):
|
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
|
del self.bin
|
||||||
TestCase.tearDown(self)
|
TestCase.tearDown(self)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue