From 84a915854ce73dadbed40fd13cea6044e7776ae9 Mon Sep 17 00:00:00 2001 From: KunoiSayami <46131041+KunoiSayami@users.noreply.github.com> Date: Thu, 22 Jul 2021 12:14:04 +0800 Subject: feat(test): Add compile time wait commit time option --- src/test.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/test.rs') diff --git a/src/test.rs b/src/test.rs index 8ae631a..100954c 100644 --- a/src/test.rs +++ b/src/test.rs @@ -212,7 +212,12 @@ mod core { 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(10)); + sleep(Duration::from_millis( + option_env!("DISK_WAIT_TIME") + .unwrap_or("10") + .parse() + .unwrap_or(10), + )); let s = test_auth_post(); -- cgit v1.3.1