Skip to content

Commit

Permalink
chore: revert sleep in loop
Browse files Browse the repository at this point in the history
  • Loading branch information
evenyag committed May 15, 2024
1 parent 1a6787c commit c9a942d
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/servers/src/tls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,8 @@ mod tests {

#[test]
fn test_tls_file_change_watch() {
common_telemetry::init_default_ut_logging();

let dir = tempfile::tempdir().unwrap();
let cert_path = dir.path().join("serevr.crt");
let key_path = dir.path().join("server.key");
Expand Down Expand Up @@ -425,12 +427,7 @@ mod tests {
.expect("failed to copy key to tmpdir");

// waiting for async load
for _ in 0..3 {
std::thread::sleep(std::time::Duration::from_millis(300));
if server_config.get_version() > 1 {
break;
}
}
std::thread::sleep(std::time::Duration::from_millis(300));
assert!(server_config.get_version() > 1);
assert!(server_config.get_server_config().is_some());
}
Expand Down

0 comments on commit c9a942d

Please sign in to comment.