Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: change sleep_test() and timestamp_test() to exclusive on Windows #4246

Merged
merged 2 commits into from
Jan 10, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion pjlib/src/pjlib-test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,18 @@ static int features_tests(int argc, char *argv[])
UT_ADD_TEST(&test_app.ut_app, hash_test, 0);
#endif

/* Windows GH CI oftent fails with:

07:27:13.217 ...testing frequency accuracy (pls wait)
07:27:23.440 ....error: timestamp drifted by 3800 usec after 10020 msec
*/
#if INCLUDE_TIMESTAMP_TEST
# if defined(PJ_WIN32) && PJ_WIN32!=0
UT_ADD_TEST(&test_app.ut_app, timestamp_test,
PJ_TEST_EXCLUSIVE | PJ_TEST_KEEP_LAST);
# else
UT_ADD_TEST(&test_app.ut_app, timestamp_test, 0);
# endif
#endif

#if INCLUDE_ATOMIC_TEST
Expand All @@ -254,8 +264,17 @@ static int features_tests(int argc, char *argv[])
UT_ADD_TEST(&test_app.ut_app, timer_test, 0);
#endif

/* Very often sleep test failed on GitHub Windows CI, with
the thread sleeping for much longer than tolerated. So
as a workaround, set it as exclusive.
*/
#if INCLUDE_SLEEP_TEST
# if defined(PJ_WIN32) && PJ_WIN32!=0
UT_ADD_TEST(&test_app.ut_app, sleep_test,
PJ_TEST_EXCLUSIVE | PJ_TEST_KEEP_LAST);
# else
UT_ADD_TEST(&test_app.ut_app, sleep_test, 0);
# endif
#endif

#if INCLUDE_FILE_TEST
Expand Down Expand Up @@ -299,7 +318,8 @@ static int features_tests(int argc, char *argv[])
*/
#if INCLUDE_IOQUEUE_STRESS_TEST
# if defined(PJ_WIN32) && PJ_WIN32!=0
UT_ADD_TEST(&test_app.ut_app, ioqueue_stress_test, PJ_TEST_EXCLUSIVE);
UT_ADD_TEST(&test_app.ut_app, ioqueue_stress_test,
PJ_TEST_EXCLUSIVE | PJ_TEST_KEEP_LAST);
# else
UT_ADD_TEST(&test_app.ut_app, ioqueue_stress_test, 0);
# endif
Expand Down
Loading