From 0f3bf764b617f22a3759871e41350f0a6f32dc40 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Thu, 11 Jul 2024 02:25:23 +0530 Subject: [PATCH] fix: override cookie settings in tests in a separate thread to not delete its value for other tests --- src/settings/server.rs | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/settings/server.rs b/src/settings/server.rs index ad3967d..c7f7612 100644 --- a/src/settings/server.rs +++ b/src/settings/server.rs @@ -58,11 +58,16 @@ mod tests { server.hostname ); env_helper!(init_settings, "VANIKAM_server_IP", "1.1.1.1", server.ip); - env_helper!( - init_settings, - "VANIKAM_server_COOKIE_SECRET", - "asdfasdflkjhasdlkfhalksdf", - server.cookie_secret - ); + std::thread::spawn(move || { + env_helper!( + init_settings, + "VANIKAM_server_COOKIE_SECRET", + "asdfasdflkjhasdlkfhalksdf", + server.cookie_secret + ); + assert!(true); + }) + .join() + .unwrap(); } }