diff --git a/Cargo.lock b/Cargo.lock index 7ac29a5d7..5e8a9fce0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5084,6 +5084,7 @@ dependencies = [ "serde", "serde_json", "serde_with", + "serial_test", "snafu 0.8.9", "tempfile", "test-log", @@ -8128,6 +8129,15 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "scc" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "46e6f046b7fef48e2660c57ed794263155d713de679057f2d0c169bfc6e756cc" +dependencies = [ + "sdd", +] + [[package]] name = "schannel" version = "0.1.29" @@ -8194,6 +8204,12 @@ dependencies = [ "untrusted 0.9.0", ] +[[package]] +name = "sdd" +version = "3.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "490dcfcbfef26be6800d11870ff2df8774fa6e86d047e3e8c8a76b25655e41ca" + [[package]] name = "sec1" version = "0.3.0" @@ -8384,6 +8400,32 @@ dependencies = [ "unsafe-libyaml", ] +[[package]] +name = "serial_test" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "911bd979bf1070a3f3aa7b691a3b3e9968f339ceeec89e08c280a8a22207a32f" +dependencies = [ + "futures-executor", + "futures-util", + "log", + "once_cell", + "parking_lot", + "scc", + "serial_test_derive", +] + +[[package]] +name = "serial_test_derive" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a7d91949b85b0d2fb687445e448b40d322b6b3e4af6b44a29b21d9a5f33e6d9" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.117", +] + [[package]] name = "sha1" version = "0.10.6" diff --git a/rust/lancedb/Cargo.toml b/rust/lancedb/Cargo.toml index b23b816ac..f83044324 100644 --- a/rust/lancedb/Cargo.toml +++ b/rust/lancedb/Cargo.toml @@ -104,6 +104,7 @@ datafusion.workspace = true http-body = "1" # Matching reqwest rstest = "0.23.0" test-log = "0.2" +serial_test = "3" [features] diff --git a/rust/lancedb/src/remote/client.rs b/rust/lancedb/src/remote/client.rs index 7fd5c6497..9197ba74a 100644 --- a/rust/lancedb/src/remote/client.rs +++ b/rust/lancedb/src/remote/client.rs @@ -888,6 +888,7 @@ pub mod test_utils { #[cfg(test)] mod tests { use super::*; + use serial_test::serial; use std::time::Duration; #[test] @@ -1143,6 +1144,7 @@ mod tests { } #[test] + #[serial(user_id_env)] fn test_resolve_user_id_none() { let config = ClientConfig::default(); // Clear env vars that might be set from other tests @@ -1155,6 +1157,7 @@ mod tests { } #[test] + #[serial(user_id_env)] fn test_resolve_user_id_from_env() { // SAFETY: This is only called in tests unsafe { @@ -1169,6 +1172,7 @@ mod tests { } #[test] + #[serial(user_id_env)] fn test_resolve_user_id_from_env_key() { // SAFETY: This is only called in tests unsafe { @@ -1189,6 +1193,7 @@ mod tests { } #[test] + #[serial(user_id_env)] fn test_resolve_user_id_direct_takes_precedence() { // SAFETY: This is only called in tests unsafe { @@ -1206,6 +1211,7 @@ mod tests { } #[test] + #[serial(user_id_env)] fn test_resolve_user_id_empty_env_ignored() { // SAFETY: This is only called in tests unsafe {