From 515037ee9a7eb00908c1d5edaf1db3586a55cb75 Mon Sep 17 00:00:00 2001 From: Yuhao Su Date: Mon, 22 Jul 2024 12:44:33 -0500 Subject: [PATCH] fix --- src/common/secret/src/secret_manager.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/common/secret/src/secret_manager.rs b/src/common/secret/src/secret_manager.rs index 7483ac4d25089..b6a71a4c3ebe8 100644 --- a/src/common/secret/src/secret_manager.rs +++ b/src/common/secret/src/secret_manager.rs @@ -48,6 +48,10 @@ impl LocalSecretManager { .join(cluster_id) .join(worker_id.to_string()); std::fs::remove_dir_all(&secret_file_dir).ok(); + + // This will cause file creation conflict in simulation tests. + // Should skip testing secret files in simulation tests. + #[cfg(not(madsim))] std::fs::create_dir_all(&secret_file_dir).unwrap(); Self { @@ -87,7 +91,10 @@ impl LocalSecretManager { "Failed to remove secret directory") }) .ok(); + + #[cfg(not(madsim))] std::fs::create_dir_all(&self.secret_file_dir).unwrap(); + for secret in secrets { secret_guard.insert(secret.id, secret.value); }