Skip to content

Commit bafc4e2

Browse files
authored
Merge pull request #3402 from jsternberg/dap-test-close-client
dap: ensure test client is closed on cleanup
2 parents 2109c9d + 8841b2d commit bafc4e2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

dap/adapter_test.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ import (
1414
)
1515

1616
func TestLaunch(t *testing.T) {
17-
t.Skip("test fails with errgroup v0.16.0, that doesn't swallow panic in goroutine")
18-
1917
adapter, conn, client := NewTestAdapter[common.Config](t)
2018

2119
ctx, cancel := context.WithTimeoutCause(context.Background(), 10*time.Second, context.DeadlineExceeded)
@@ -83,14 +81,14 @@ func NewTestAdapter[C LaunchConfig](t *testing.T) (*Adapter[C], Conn, *Client) {
8381
})
8482

8583
clientConn := logConn(t, "client", NewConn(rd2, wr1))
86-
t.Cleanup(func() {
87-
clientConn.Close()
88-
})
84+
t.Cleanup(func() { clientConn.Close() })
8985

9086
adapter := New[C]()
9187
t.Cleanup(func() { adapter.Stop() })
9288

9389
client := NewClient(clientConn)
90+
t.Cleanup(func() { client.Close() })
91+
9492
return adapter, srvConn, client
9593
}
9694

0 commit comments

Comments
 (0)