diff options
| author | JJ Liebig <jonathan.liebig@gmail.com> | 2026-09-14 22:41:54 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-14 22:41:54 +0200 |
| commit | e61206cc9d4e13688d2baed4a866c2bcd6ec0736 (patch) | |
| tree | 9fbab1165d08f5b34598486d8c24b2714f4791ce /tests/multi_client.rs | |
| parent | f867dabbe676255e75a512df343617bd4ca45d0d (diff) | |
test: deflake recent CI failures (#4139)
Diffstat (limited to 'tests/multi_client.rs')
| -rw-r--r-- | tests/multi_client.rs | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/tests/multi_client.rs b/tests/multi_client.rs index 823fa0c1..04f5ed0f 100644 --- a/tests/multi_client.rs +++ b/tests/multi_client.rs @@ -75,17 +75,6 @@ fn wait_for_socket(path: &Path, timeout: Duration) { panic!("socket did not appear at {}", path.display()); } -fn wait_for_file(path: &Path, timeout: Duration) { - let deadline = Instant::now() + timeout; - while Instant::now() < deadline { - if path.exists() { - return; - } - thread::sleep(Duration::from_millis(25)); - } - panic!("socket did not appear at {}", path.display()); -} - fn spawn_server(config: &Path, runtime: &Path, api: &Path) -> SpawnedHerdr { fs::create_dir_all(config.join("herdr")).unwrap(); fs::create_dir_all(runtime).unwrap(); @@ -285,7 +274,7 @@ fn same_tab_geometry_follows_meaningful_client_activity() { let clients = runtime.join("herdr-client.sock"); let server = spawn_server(&config, &runtime, &api); wait_for_socket(&api, Duration::from_secs(10)); - wait_for_file(&clients, Duration::from_secs(10)); + wait_for_socket(&clients, Duration::from_secs(10)); let pane = create_pane(&api, "effective-size"); let _large = shell(&clients, 120, 40); let mut small = shell(&clients, 80, 24); @@ -318,7 +307,7 @@ fn api_pane_output_is_fanned_out_as_pane_surface_updates() { let clients = runtime.join("herdr-client.sock"); let server = spawn_server(&config, &runtime, &api); wait_for_socket(&api, Duration::from_secs(10)); - wait_for_file(&clients, Duration::from_secs(10)); + wait_for_socket(&clients, Duration::from_secs(10)); let pane = create_pane(&api, "fanout"); let mut a = shell(&clients, 100, 30); let mut b = shell(&clients, 100, 30); @@ -352,7 +341,7 @@ fn crashed_client_shell_does_not_affect_survivor() { let clients = runtime.join("herdr-client.sock"); let server = spawn_server(&config, &runtime, &api); wait_for_socket(&api, Duration::from_secs(10)); - wait_for_file(&clients, Duration::from_secs(10)); + wait_for_socket(&clients, Duration::from_secs(10)); let mut survivor = shell(&clients, 100, 30); let crashed = spawn_client(&config, &runtime, &api); // Give the supported client process time to complete its ClientShell hello; @@ -385,7 +374,7 @@ fn rapid_client_shell_connect_disconnect_remains_healthy() { let clients = runtime.join("herdr-client.sock"); let server = spawn_server(&config, &runtime, &api); wait_for_socket(&api, Duration::from_secs(10)); - wait_for_file(&clients, Duration::from_secs(10)); + wait_for_socket(&clients, Duration::from_secs(10)); for i in 0..10 { let mut client = shell(&clients, 80 + i, 24); send_detach(&mut client).unwrap(); |
