diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2016-03-10 12:27:07 +0100 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2016-11-14 11:35:38 +0100 |
commit | 7c32d874503ee43206cb5d2a8e65dbe23f18eaca (patch) | |
tree | 5fb9cd00cc7b6094eacb9a5ebc0eefd33b2eb909 /tests/threads | |
parent | 33248b9edb74a6bac4223873402efe68a76a30a0 (diff) | |
download | libgit2-7c32d874503ee43206cb5d2a8e65dbe23f18eaca.tar.gz |
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.
Diffstat (limited to 'tests/threads')
-rw-r--r-- | tests/threads/refdb.c | 4 |
1 files changed, 4 insertions, 0 deletions
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); } |