fixed thread test to make sure it runs on all scheduling environments
This commit is contained in:
parent
5e8312cc82
commit
f790cf1965
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
|
|
||||||
Author : $Author: maroy $
|
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 $
|
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);
|
CPPUNIT_ASSERT(runnable->getState() == TestRunnable::created);
|
||||||
thread->start();
|
thread->start();
|
||||||
|
// sleep to yield the thread some time to actually start
|
||||||
|
TimeConversion::sleep(sleepTime);
|
||||||
CPPUNIT_ASSERT(runnable->getState() == TestRunnable::running);
|
CPPUNIT_ASSERT(runnable->getState() == TestRunnable::running);
|
||||||
TimeConversion::sleep(sleepTime);
|
TimeConversion::sleep(sleepTime);
|
||||||
CPPUNIT_ASSERT(runnable->getState() == TestRunnable::running);
|
CPPUNIT_ASSERT(runnable->getState() == TestRunnable::running);
|
||||||
|
|
Loading…
Reference in New Issue