fixed thread test to make sure it runs on all scheduling environments

This commit is contained in:
maroy 2004-11-18 15:59:22 +00:00
parent 5e8312cc82
commit f790cf1965
1 changed files with 3 additions and 1 deletions

View File

@ -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);