diff --git a/internal/agent/tools/bash_background_test.go b/internal/agent/tools/bash_background_test.go index 8e9675d419fa6c3532b43a8cbef37cd19f6969b5..1004009c14375ed0399a1b9d9afca468b0546afd 100644 --- a/internal/agent/tools/bash_background_test.go +++ b/internal/agent/tools/bash_background_test.go @@ -60,33 +60,6 @@ func TestBackgroundShell_Kill(t *testing.T) { require.True(t, bgShell.IsDone()) } -func TestBackgroundShell_GetWorkingDir_NoHang(t *testing.T) { - t.Parallel() - - workingDir := t.TempDir() - ctx := context.Background() - - // Start a long-running background shell - bgManager := shell.GetBackgroundShellManager() - bgShell, err := bgManager.Start(ctx, workingDir, nil, "sleep 10") - require.NoError(t, err) - defer bgManager.Kill(bgShell.ID) - - // This should complete quickly without hanging, even while the command is running - done := make(chan string, 1) - go func() { - dir := bgShell.GetWorkingDir() - done <- dir - }() - - select { - case dir := <-done: - require.Equal(t, workingDir, dir) - case <-time.After(2 * time.Second): - t.Fatal("GetWorkingDir() hung - did not complete within timeout") - } -} - func TestBackgroundShell_GetOutput_NoHang(t *testing.T) { t.Parallel()