From 67e11e0fc3888a82f460b51c7d5071585d0db318 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Mon, 15 Mar 2021 17:09:29 -0700 Subject: [PATCH] git_store: wait 1 minute for lock on refs to help tests `test_commit_parallel` was failing on Mac in the GitHub CI. I suspect the reason was that it was timing out. The test runs in about 1 s on my Linux desktop and in about 3 s on my Mac laptop. It failed after 31 in the GitHub CI. This patch increases the timeout to 1 minute to try to make the test pass. It would be better to set the timeout to a higher value only in tests, but this will be good enough for now. By the way, it has turned out that git notes (at least libgit2's implementation of them) are too slow, so we should probably eventually create our own storage for the extra metadata instead. --- lib/src/git_store.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/git_store.rs b/lib/src/git_store.rs index 19118ad7c..bd0be5969 100644 --- a/lib/src/git_store.rs +++ b/lib/src/git_store.rs @@ -146,7 +146,7 @@ fn write_note( }; let mut backoff = ExponentialBackoff { initial_interval: Duration::from_millis(1), - max_elapsed_time: Some(Duration::from_secs(10)), + max_elapsed_time: Some(Duration::from_secs(60)), ..Default::default() }; try_write_note