From 4f6970cb5eaa6520293739bc15aa2afd7cbf3797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20P=C3=A9ron?= Date: Tue, 2 Jul 2024 19:47:02 +0200 Subject: [PATCH] testing: cv_wait_example: relax max waiting time --- testing/cv_wait_example_test.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/testing/cv_wait_example_test.c b/testing/cv_wait_example_test.c index ab34cb5..80bb717 100644 --- a/testing/cv_wait_example_test.c +++ b/testing/cv_wait_example_test.c @@ -155,14 +155,14 @@ static void example_cv_wait (testing t) { /* delay: "one", "two", "three" are queued; not "four" */ nsync_time_sleep (nsync_time_ms (1200)); - remove_and_print_cv (&q, nsync_time_ms (1000), &output); /* "one" */ - remove_and_print_cv (&q, nsync_time_ms (1000), &output); /* "three" (less than "two") */ - remove_and_print_cv (&q, nsync_time_ms (1000), &output); /* "two" */ - remove_and_print_cv (&q, nsync_time_ms (100), &output); /* time out because 1.3 < 0.5*3 */ - remove_and_print_cv (&q, nsync_time_ms (1000), &output); /* "four" */ - remove_and_print_cv (&q, nsync_time_ms (100), &output); /* time out because 0.1 < 0.5 */ - remove_and_print_cv (&q, nsync_time_ms (1000), &output); /* "five" */ - remove_and_print_cv (&q, nsync_time_ms (1000), &output); /* time out: no more to fetch */ + remove_and_print_cv (&q, nsync_time_ms (2000), &output); /* "one" */ + remove_and_print_cv (&q, nsync_time_ms (2000), &output); /* "three" (less than "two") */ + remove_and_print_cv (&q, nsync_time_ms (2000), &output); /* "two" */ + remove_and_print_cv (&q, nsync_time_ms (200), &output); /* time out because 1.3 < 0.5*3 */ + remove_and_print_cv (&q, nsync_time_ms (2000), &output); /* "four" */ + remove_and_print_cv (&q, nsync_time_ms (200), &output); /* time out because 0.1 < 0.5 */ + remove_and_print_cv (&q, nsync_time_ms (2000), &output); /* "five" */ + remove_and_print_cv (&q, nsync_time_ms (2000), &output); /* time out: no more to fetch */ A_PUSH (&output) = 0; if (strcmp (&A (&output, 0), expected) != 0) {