Skip to content

Commit b31283a

Browse files
committed
refdb: disable concurrent compress in the threading tests on Windows
This is far from an ideal situation, but this causes issues on Windows which make it harder to develop anything, as these tests hit issues which relate specifically to the Windows filesystem like permission errors for files we should be able to access. There is an issue likely related to the ordering of the repack, but there's enough noise that it does not currently help us to run this aspect of the test in CI.
1 parent 8339c66 commit b31283a

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)