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