From 88daf004a1d89f2aa5314a7e4d888c1a576bff31 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 | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/testing/cv_wait_example_test.c b/testing/cv_wait_example_test.c index ab34cb5..17068f2 100644 --- a/testing/cv_wait_example_test.c +++ b/testing/cv_wait_example_test.c @@ -150,19 +150,19 @@ static void example_cv_wait (testing t) { memset (&output, 0, sizeof (output)); closure_fork (closure_add_and_wait_cv (&add_and_wait_cv, &q, - nsync_time_ms (500), NELEM (input), input)); + nsync_time_ms (1000), NELEM (input), input)); /* 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 */ + nsync_time_sleep (nsync_time_ms (2400)); + + 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) {