From f790cf196525780b0229997190a065930e7757da Mon Sep 17 00:00:00 2001 From: maroy Date: Thu, 18 Nov 2004 15:59:22 +0000 Subject: [PATCH] fixed thread test to make sure it runs on all scheduling environments --- livesupport/modules/core/src/ThreadTest.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/livesupport/modules/core/src/ThreadTest.cxx b/livesupport/modules/core/src/ThreadTest.cxx index 8758731cb..933042cd3 100644 --- a/livesupport/modules/core/src/ThreadTest.cxx +++ b/livesupport/modules/core/src/ThreadTest.cxx @@ -22,7 +22,7 @@ Author : $Author: maroy $ - Version : $Revision: 1.1 $ + Version : $Revision: 1.2 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/core/src/ThreadTest.cxx,v $ ------------------------------------------------------------------------------*/ @@ -88,6 +88,8 @@ ThreadTest :: simpleTest(void) CPPUNIT_ASSERT(runnable->getState() == TestRunnable::created); thread->start(); + // sleep to yield the thread some time to actually start + TimeConversion::sleep(sleepTime); CPPUNIT_ASSERT(runnable->getState() == TestRunnable::running); TimeConversion::sleep(sleepTime); CPPUNIT_ASSERT(runnable->getState() == TestRunnable::running);