From e92521c9143fb41fbb664ac6864e575fd79416b3 Mon Sep 17 00:00:00 2001 From: KunoiSayami <46131041+KunoiSayami@users.noreply.github.com> Date: Mon, 12 Jul 2021 23:51:44 +0800 Subject: fix(test): Fix cargo test fail if process is too fast may panic --- src/test.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test.rs b/src/test.rs index 09a1556..fee2e0f 100644 --- a/src/test.rs +++ b/src/test.rs @@ -211,6 +211,8 @@ mod core { #[test] fn test_91_auth_pass() { lock(&PathBuf::from("test/REPO_USER_ADDED"), 10); + // If process is too fast, this function may got Database locked error + sleep(Duration::from_millis(50)); let s = test_auth_post(); -- cgit v1.3.1