tests: make the race easier to win

This commit is contained in:
Skia 2025-09-01 23:40:51 +02:00
parent 4b205bf2e9
commit 3146c2f186

View file

@ -82,13 +82,13 @@ impl Sway {
pub fn spawn_some_apps(&self) {
self.send_command(["exec", "foot -T TERM1"].as_slice());
// Make sure the app are created in the right order.
// 50ms would still sometimes be racy on my Ryzen 5 PRO 4650U, so let's
// 200ms would still sometimes be racy on my Ryzen 5 PRO 4650U, so let's
// take a safe bet and give plenty of time for shared CI runners.
std::thread::sleep(std::time::Duration::from_millis(200));
std::thread::sleep(std::time::Duration::from_millis(500));
self.send_command(["exec", "foot -T TERM2"].as_slice());
std::thread::sleep(std::time::Duration::from_millis(200));
std::thread::sleep(std::time::Duration::from_millis(500));
self.send_command(["exec", "foot -T TERM3"].as_slice());
std::thread::sleep(std::time::Duration::from_millis(200));
std::thread::sleep(std::time::Duration::from_millis(500));
}
fn check_connection(&self, flag: &str) -> Result<(), ()> {