Skip to content

Commit

Permalink
Set sleep_test() as exclusive on Windows. Also set exclusive tests to…
Browse files Browse the repository at this point in the history
… run last for slightly more efficient testing time
  • Loading branch information
bennylp committed Jan 10, 2025
1 parent 6853491 commit fcae1c1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion pjlib/src/pjlib-test/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,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 +308,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

0 comments on commit fcae1c1

Please sign in to comment.