Skip to content

Commit 7c32d87

Browse files
committed
refdb: expect threaded test deletes to race
At times we may try to delete a reference which a different thread has already taken care of.
1 parent 33248b9 commit 7c32d87

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/threads/refdb.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ static void *delete_refs(void *arg)
104104
do {
105105
error = git_reference_delete(ref);
106106
} while (error == GIT_ELOCKED);
107+
/* Sometimes we race with other deleter threads */
108+
if (error == GIT_ENOTFOUND)
109+
error = 0;
110+
107111
cl_git_pass(error);
108112
git_reference_free(ref);
109113
}

0 commit comments

Comments
 (0)