test(sensing-server): unique per-process temp dirs (deterministic under concurrent runs)

checkpoint_round_trip / rvf_test / rvf_pipeline_test shared fixed temp_dir paths
and remove_dir at teardown, so two concurrent/repeated test runs raced (one's
teardown wiped the other's file -> NotFound). Make each dir process-unique.
Test-only; no public API change.

Co-Authored-By: claude-flow <ruv@ruv.net>
This commit is contained in:
ruv 2026-06-12 00:11:24 -04:00
parent 8ad0d0f91c
commit d120cc2278
3 changed files with 3 additions and 3 deletions

View File

@ -894,7 +894,7 @@ mod tests {
#[test]
fn file_round_trip() {
let dir = std::env::temp_dir().join("rvf_test");
let dir = std::env::temp_dir().join(format!("rvf_test_{}", std::process::id()));
std::fs::create_dir_all(&dir).unwrap();
let path = dir.join("test_model.rvf");

View File

@ -1002,7 +1002,7 @@ mod tests {
#[test]
fn rvf_model_file_round_trip() {
let dir = std::env::temp_dir().join("rvf_pipeline_test");
let dir = std::env::temp_dir().join(format!("rvf_pipeline_test_{}", std::process::id()));
std::fs::create_dir_all(&dir).unwrap();
let path = dir.join("pipeline_model.rvf");

View File

@ -1318,7 +1318,7 @@ mod tests {
let mut t = Trainer::new(TrainerConfig::default());
t.train_epoch(&[sample()]);
let ckpt = t.checkpoint();
let dir = std::env::temp_dir().join("trainer_ckpt_test");
let dir = std::env::temp_dir().join(format!("trainer_ckpt_test_{}", std::process::id()));
std::fs::create_dir_all(&dir).unwrap();
let path = dir.join("ckpt.json");
ckpt.save_to_file(&path).unwrap();