for the tests change some sleep into much shorter micro sleeps
This commit is contained in:
parent
a8285878ac
commit
7660324d23
3 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue