Skip to content

Commit

Permalink
tests: posix: mqueue: increase sleep ms to reduce failures
Browse files Browse the repository at this point in the history
The test_mqueue_notify_thread testcase had a relatively high
failure rate because sleeping only 10ms was in some cases not
sufficiently long enough for the spawned thread to update
notification_executed.

Sleep 100 ms instead of 10 ms to reduce the failure rate.

Signed-off-by: Christopher Friedt <[email protected]>
  • Loading branch information
cfriedt committed Feb 26, 2024
1 parent ee9c44f commit f60ef4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/posix/common/src/mqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ ZTEST(mqueue, test_mqueue_notify_thread)

zassert_ok(mq_send(mqd, send_data, MESSAGE_SIZE, 0), "Unable to send message");

usleep(USEC_PER_MSEC * 10U);
usleep(USEC_PER_MSEC * 100U);

zassert_true(notification_executed, "Notification not triggered.");

Expand Down

0 comments on commit f60ef4d

Please sign in to comment.