Skip to content

Commit 2e54b47

Browse files
stephentoubCopilot
andcommitted
Close Go/.NET shell-test teardown gap
The "should kill shell process" e2e test exists in all five SDKs, but only Node, Python and Rust destroy the session at the end of it. Go tears the whole client down with client.ForceStop() and .NET simply ended at the last assert, so neither ever exercised session.destroy after a session.shell.exec. That gap is why Go and .NET stayed green on CLI 1.0.76-0 while Node, Python and Rust hang: the hang is in session.destroy after a shell exec, and the two green SDKs never made the call. Adding the teardown makes all five cover the same sequence. Verified locally against the same CLI binary (1.0.76-0, sha256 b8bfad2c...): with the added Disconnect(), the Go test hangs past a 3-minute timeout where it previously passed in seconds. The same test passes on CLI 1.0.73. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: e615d062-bcb7-431e-aa9c-d3e47405723a
1 parent 951d4bf commit 2e54b47

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

dotnet/test/E2E/RpcShellAndFleetE2ETests.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ public async Task Should_Kill_Shell_Process()
4141
var killResult = await session.Rpc.Shell.KillAsync(execResult.ProcessId);
4242

4343
Assert.True(killResult.Killed);
44+
45+
await session.DisposeAsync();
4446
}
4547

4648
[Fact]

go/internal/e2e/rpc_shell_and_fleet_e2e_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ func TestRPCShellAndFleetE2E(t *testing.T) {
8181
if !kill.Killed {
8282
t.Errorf("Expected shell.kill to report Killed=true, got %+v", kill)
8383
}
84+
85+
if err := session.Disconnect(); err != nil {
86+
t.Fatalf("Failed to disconnect session: %v", err)
87+
}
8488
})
8589

8690
t.Run("should start fleet and complete custom tool task", func(t *testing.T) {

0 commit comments

Comments
 (0)