summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2023-04-11 20:59:30 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2023-05-13 16:42:04 +0100
commit8f695c806bac2b044f102c55b802e44f2d30ca01 (patch)
tree73fb6759a3138023f85654e38dcac1fb9cc4c7ad
parent14c820b191a7083bf9a54792e09afcd83e0f0206 (diff)
downloadlibgit2-8f695c806bac2b044f102c55b802e44f2d30ca01.tar.gz
clone: skip timeout tests on WinHTTPethomson/timeouts
-rw-r--r--tests/libgit2/online/clone.c16
1 files changed, 16 insertions, 0 deletions
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
}