Lengthen timeout in ddsc_guardcond_waitset_thread

Rare intermittent failure appears to be timing.  Increasing the timeout
doesn't affect the duration of a successful run and will still signal an
missing trigger.

Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
Erik Boasson 2019-09-10 15:55:06 +02:00 committed by eboasson
parent 1e094c6fbb
commit 3ff26103cb

View file

@ -145,7 +145,7 @@ static uint32_t guardcond_thread (void *varg)
{ {
struct guardcond_thread_arg *arg = varg; struct guardcond_thread_arg *arg = varg;
/* 200ms sleep is hopefully always long enough for the main thread to /* 200ms sleep is hopefully always long enough for the main thread to
enter wait() and block; a further 800ms (see wait call) similarly enter wait() and block; a further 1800ms (see wait call) similarly
for the guard condition to actually trigger it. */ for the guard condition to actually trigger it. */
dds_sleepfor (DDS_MSECS (200)); dds_sleepfor (DDS_MSECS (200));
arg->ret = dds_set_guardcondition (arg->gc, true); arg->ret = dds_set_guardcondition (arg->gc, true);
@ -174,7 +174,7 @@ CU_Test (ddsc_guardcond, waitset_thread)
rc = ddsrt_thread_create (&tid, "guardcond_thread", &tattr, guardcond_thread, &arg); rc = ddsrt_thread_create (&tid, "guardcond_thread", &tattr, guardcond_thread, &arg);
CU_ASSERT_FATAL (rc == 0); CU_ASSERT_FATAL (rc == 0);
rc = dds_waitset_wait (ws, xs, 1, DDS_SECS (1)); rc = dds_waitset_wait (ws, xs, 1, DDS_SECS (2));
CU_ASSERT (rc == 1); CU_ASSERT (rc == 1);
CU_ASSERT (xs[0] == gc); CU_ASSERT (xs[0] == gc);