From c9a942d77b02b7a7947fc57cac3cdeec8e95944b Mon Sep 17 00:00:00 2001 From: evenyag Date: Wed, 15 May 2024 17:06:22 +0800 Subject: [PATCH] chore: revert sleep in loop --- src/servers/src/tls.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/servers/src/tls.rs b/src/servers/src/tls.rs index c7c33328c221..9a3082b46c7e 100644 --- a/src/servers/src/tls.rs +++ b/src/servers/src/tls.rs @@ -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"); @@ -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()); }