From 8f695c806bac2b044f102c55b802e44f2d30ca01 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Tue, 11 Apr 2023 20:59:30 +0100 Subject: clone: skip timeout tests on WinHTTP --- tests/libgit2/online/clone.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests') diff --git a/tests/libgit2/online/clone.c b/tests/libgit2/online/clone.c index 92fa4d351..dbcac50ae 100644 --- a/tests/libgit2/online/clone.c +++ b/tests/libgit2/online/clone.c @@ -1218,6 +1218,9 @@ void test_online_clone__sha256(void) void test_online_clone__connect_timeout_configurable(void) { +#ifdef GIT_WINHTTP + cl_skip(); +#else uint64_t start, finish; start = git_time_monotonic(); @@ -1229,10 +1232,14 @@ void test_online_clone__connect_timeout_configurable(void) finish = git_time_monotonic(); cl_assert(finish - start < 1000); +#endif } void test_online_clone__connect_timeout_default(void) { +#ifdef GIT_WINHTTP + cl_skip(); +#else /* This test takes ~ 75 seconds on Unix. */ if (!cl_is_env_set("GITTEST_INVASIVE_SPEED")) cl_skip(); @@ -1243,10 +1250,14 @@ void test_online_clone__connect_timeout_default(void) */ cl_git_fail_with(GIT_TIMEOUT, git_clone(&g_repo, "http://www.google.com:8000/", "./refused", NULL)); cl_assert(git_error_last() && strstr(git_error_last()->message, "timed out")); +#endif } void test_online_clone__timeout_configurable_times_out(void) { +#ifdef GIT_WINHTTP + cl_skip(); +#else git_repository *failed_repo; if (!_remote_speed_timesout) @@ -1256,14 +1267,19 @@ void test_online_clone__timeout_configurable_times_out(void) cl_git_fail_with(GIT_TIMEOUT, git_clone(&failed_repo, _remote_speed_timesout, "./timedout", NULL)); cl_assert(git_error_last() && strstr(git_error_last()->message, "timed out")); +#endif } void test_online_clone__timeout_configurable_succeeds_slowly(void) { +#ifdef GIT_WINHTTP + cl_skip(); +#else if (!_remote_speed_slow) cl_skip(); cl_git_pass(git_libgit2_opts(GIT_OPT_SET_SERVER_TIMEOUT, 1000)); cl_git_pass(git_clone(&g_repo, _remote_speed_slow, "./slow-but-successful", NULL)); +#endif } -- cgit v1.2.1