Skip to content

Commit

Permalink
adjust
Browse files Browse the repository at this point in the history
Signed-off-by: tison <[email protected]>
  • Loading branch information
tisonkun committed Mar 26, 2024
1 parent bafad5c commit e35a0ef
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/auth/src/user_provider/watch_file_user_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ pub mod test {
test_authenticate(&provider, "admin", "654321", true, None).await;
test_authenticate(&provider, "root", "654321", false, None).await;

let timeout = Duration::from_secs(2);
let timeout = Duration::from_secs(60);
{
// update the tmp file
let file = File::create(&file_path).unwrap();
Expand All @@ -198,7 +198,6 @@ pub mod test {
// remove the tmp file
std::fs::remove_file(&file_path).unwrap();
}
sleep(Duration::from_secs(2)).await; // wait the watcher to apply the change
test_authenticate(&provider, "root", "123456", true, Some(timeout)).await;
test_authenticate(&provider, "root", "654321", true, Some(timeout)).await;
test_authenticate(&provider, "admin", "654321", true, Some(timeout)).await;
Expand All @@ -210,7 +209,6 @@ pub mod test {
assert!(writeln!(lw, "root=123456").is_ok());
lw.flush().unwrap();
}
sleep(Duration::from_secs(2)).await; // wait the watcher to apply the change
test_authenticate(&provider, "root", "123456", true, Some(timeout)).await;
test_authenticate(&provider, "root", "654321", false, Some(timeout)).await;
test_authenticate(&provider, "admin", "654321", false, Some(timeout)).await;
Expand Down

0 comments on commit e35a0ef

Please sign in to comment.