diff --git a/pjlib/src/pjlib-test/test.c b/pjlib/src/pjlib-test/test.c index 055f8a2c9b..6ccb712238 100644 --- a/pjlib/src/pjlib-test/test.c +++ b/pjlib/src/pjlib-test/test.c @@ -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 @@ -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