@@ -128,12 +128,8 @@ func TestBackgroundShell_IsDone(t *testing.T) {
128 t.Fatalf("failed to start background shell: %v", err)
128 t.Fatalf("failed to start background shell: %v", err)
131− // Wait a bit for the command to complete
131+ // Wait for the command to complete (Windows is slower to spin up).
132− time.Sleep(100 * time.Millisecond)
132+ require.Eventually(t, bgShell.IsDone, 5*time.Second, 50*time.Millisecond, "expected shell to be done")
134− if !bgShell.IsDone() {
135− t.Error("expected shell to be done")
138 // Clean up
134 // Clean up
139 manager.Kill(bgShell.ID)
135 manager.Kill(bgShell.ID)