relax the wait period

Signed-off-by: tison <wander4096@gmail.com>
This commit is contained in:
tison
2024-03-26 15:53:07 +08:00
parent 9c9bc82f45
commit 46752b5c69

View File

@@ -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;