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