summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-12-15 18:19:49 -0600
committerGitHub <noreply@github.com>2016-12-15 18:19:49 -0600
commitc5e6ba289266e56b8e7f7c9b463aa7008d4b0258 (patch)
treecce251fb884106cf3cac04011d34b56db7f56ccd
parent9d5f12ffd71958eb269af7f04d254e3cd6689f50 (diff)
parentb31283a658eb6fdbfaf7256d5303f1ce06de404f (diff)
downloadlibgit2-c5e6ba289266e56b8e7f7c9b463aa7008d4b0258.tar.gz
Merge pull request #4029 from libgit2/cmn/windows-no-concurrent-compressv0.24.4
refdb: disable concurrent compress in the threading tests on Windows
-rw-r--r--tests/threads/refdb.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/threads/refdb.c b/tests/threads/refdb.c
index e2f7563c7..94c5f5057 100644
--- a/tests/threads/refdb.c
+++ b/tests/threads/refdb.c
@@ -5,6 +5,12 @@
static git_repository *g_repo;
static int g_expected = 0;
+#ifdef GIT_WIN32
+static bool concurrent_compress = false;
+#else
+static bool concurrent_compress = true;
+#endif
+
void test_threads_refdb__initialize(void)
{
g_repo = NULL;
@@ -79,7 +85,7 @@ static void *create_refs(void *arg)
} while (error == GIT_ELOCKED);
cl_git_thread_pass(data, error);
- if (i == NREFS/2) {
+ if (concurrent_compress && i == NREFS/2) {
git_refdb *refdb;
cl_git_thread_pass(data, git_repository_refdb(&refdb, repo));
do {
@@ -125,7 +131,7 @@ static void *delete_refs(void *arg)
git_reference_free(ref);
}
- if (i == NREFS/2) {
+ if (concurrent_compress && i == NREFS/2) {
git_refdb *refdb;
cl_git_thread_pass(data, git_repository_refdb(&refdb, repo));
do {