for the tests change some sleep into much shorter micro sleeps

This commit is contained in:
Fischlurch 2009-01-25 03:33:29 +01:00
parent a8285878ac
commit 7660324d23
3 changed files with 3 additions and 3 deletions

View file

@ -162,7 +162,7 @@ namespace lib {
ASSERT (pong);
ASSERT (0 == tok.result());
sleep (1); // if the threads don't block correctly, they've missed their chance by now...
usleep (100000); // if the threads don't block correctly, they've missed their chance by now...
// kick off the notification cascade...
uint val = (rand() % 1000);

View file

@ -62,7 +62,7 @@ namespace lib {
void
theAction (int secretValue) ///< to be run in a new thread...
{
sleep(1);
usleep (100000); // pause 100ms prior to modifying
aValue_ = secretValue+42;
}

View file

@ -98,7 +98,7 @@ namespace lib {
sum = checksum = 0;
TestThread instances[NUM_THREADS] SIDEEFFECT;
sleep (1); /////////////////TODO better method of waiting for the threads to terminate.....
usleep (200000); // pause 200ms for the threads to terminate.....
ASSERT (0 < sum);
ASSERT (sum==checksum);