From 46752b5c693f87a2fbc09b2377bc74996614dc81 Mon Sep 17 00:00:00 2001 From: tison Date: Tue, 26 Mar 2024 15:53:07 +0800 Subject: [PATCH] relax the wait period Signed-off-by: tison --- src/auth/src/user_provider/watch_file_user_provider.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/auth/src/user_provider/watch_file_user_provider.rs b/src/auth/src/user_provider/watch_file_user_provider.rs index 7616aeced4..19b6530f21 100644 --- a/src/auth/src/user_provider/watch_file_user_provider.rs +++ b/src/auth/src/user_provider/watch_file_user_provider.rs @@ -169,7 +169,7 @@ pub mod test { assert!(writeln!(lw, "root=654321").is_ok()); lw.flush().unwrap(); } - sleep(Duration::from_secs(1)).await; // wait the watcher to apply the change + sleep(Duration::from_secs(2)).await; // wait the watcher to apply the change test_authenticate(&provider, "root", "123456", false).await; test_authenticate(&provider, "root", "654321", true).await; test_authenticate(&provider, "admin", "654321", false).await; @@ -178,7 +178,7 @@ pub mod test { // remove the tmp file std::fs::remove_file(&file_path).unwrap(); } - sleep(Duration::from_secs(1)).await; // wait the watcher to apply the change + sleep(Duration::from_secs(2)).await; // wait the watcher to apply the change test_authenticate(&provider, "root", "123456", true).await; test_authenticate(&provider, "root", "654321", true).await; test_authenticate(&provider, "admin", "654321", true).await; @@ -190,7 +190,7 @@ pub mod test { assert!(writeln!(lw, "root=123456").is_ok()); lw.flush().unwrap(); } - sleep(Duration::from_secs(1)).await; // wait the watcher to apply the change + sleep(Duration::from_secs(2)).await; // wait the watcher to apply the change test_authenticate(&provider, "root", "123456", true).await; test_authenticate(&provider, "root", "654321", false).await; test_authenticate(&provider, "admin", "654321", false).await;