Skip to content

Commit

Permalink
testing: cv_wait_example: relax max waiting time
Browse files Browse the repository at this point in the history
  • Loading branch information
clementperon committed Jul 2, 2024
1 parent 6bce2c5 commit 4f6970c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions testing/cv_wait_example_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 4f6970c

Please sign in to comment.