tests: Stabilize snapshot_restore tests

See: #5938

Signed-off-by: Bo Chen <chen.bo@intel.com>
This commit is contained in:
Bo Chen 2023-12-05 09:44:02 -08:00 committed by Rob Bradford
parent 77f4e35bc8
commit 5d411d257a

View File

@ -687,6 +687,8 @@ fn resize_command(
device_id: None,
},
];
// See: #5938
thread::sleep(std::time::Duration::new(1, 0));
assert!(check_latest_events_exact(&latest_events, event_path));
}
@ -5960,6 +5962,8 @@ mod common_parallel {
event: "device-removed".to_string(),
device_id: Some(net_id.to_string()),
}];
// See: #5938
thread::sleep(std::time::Duration::new(1, 0));
assert!(check_latest_events_exact(&latest_events, &event_path));
// Plug the virtio-net device again
@ -5983,6 +5987,8 @@ mod common_parallel {
device_id: None,
},
];
// See: #5938
thread::sleep(std::time::Duration::new(1, 0));
assert!(check_latest_events_exact(&latest_events, &event_path));
// Take a snapshot from the VM
@ -6005,6 +6011,8 @@ mod common_parallel {
device_id: None,
},
];
// See: #5938
thread::sleep(std::time::Duration::new(1, 0));
assert!(check_latest_events_exact(&latest_events, &event_path));
});