From 7c32d874503ee43206cb5d2a8e65dbe23f18eaca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Thu, 10 Mar 2016 12:27:07 +0100 Subject: [PATCH] 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. --- tests/threads/refdb.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/threads/refdb.c b/tests/threads/refdb.c index 0c5cd2be6..d8dc77ba5 100644 --- a/tests/threads/refdb.c +++ b/tests/threads/refdb.c @@ -104,6 +104,10 @@ static void *delete_refs(void *arg) do { error = git_reference_delete(ref); } while (error == GIT_ELOCKED); + /* Sometimes we race with other deleter threads */ + if (error == GIT_ENOTFOUND) + error = 0; + cl_git_pass(error); git_reference_free(ref); }