Skip to content

Commit c5e6ba2

Browse files
author
Edward Thomson
authored
Merge pull request libgit2#4029 from libgit2/cmn/windows-no-concurrent-compress
refdb: disable concurrent compress in the threading tests on Windows
2 parents 9d5f12f + b31283a commit c5e6ba2

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tests/threads/refdb.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55
static git_repository *g_repo;
66
static int g_expected = 0;
77

8+
#ifdef GIT_WIN32
9+
static bool concurrent_compress = false;
10+
#else
11+
static bool concurrent_compress = true;
12+
#endif
13+
814
void test_threads_refdb__initialize(void)
915
{
1016
g_repo = NULL;
@@ -79,7 +85,7 @@ static void *create_refs(void *arg)
7985
} while (error == GIT_ELOCKED);
8086
cl_git_thread_pass(data, error);
8187

82-
if (i == NREFS/2) {
88+
if (concurrent_compress && i == NREFS/2) {
8389
git_refdb *refdb;
8490
cl_git_thread_pass(data, git_repository_refdb(&refdb, repo));
8591
do {
@@ -125,7 +131,7 @@ static void *delete_refs(void *arg)
125131
git_reference_free(ref);
126132
}
127133

128-
if (i == NREFS/2) {
134+
if (concurrent_compress && i == NREFS/2) {
129135
git_refdb *refdb;
130136
cl_git_thread_pass(data, git_repository_refdb(&refdb, repo));
131137
do {

0 commit comments

Comments
 (0)