aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKunoiSayami <[email protected]>2021-07-12 23:51:44 +0800
committerKunoiSayami <[email protected]>2021-07-12 23:51:44 +0800
commite92521c9143fb41fbb664ac6864e575fd79416b3 (patch)
treea3339c0c6b498482bb4851ebdf4df89d314ee700
parentb4d2a6464200751e0bf818e0d1587a60344c1133 (diff)
fix(test): Fix cargo test fail if process is too fast may panic
-rw-r--r--src/test.rs2
1 files changed, 2 insertions, 0 deletions
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();