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:
parent
8ad0d0f91c
commit
d120cc2278
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue