mcp: fix several goroutine leaks in tests (#494)
Fix some (but not all) goroutine leaks in tests. Others were nontrivial, because they relate to streamable http. For #489.
This commit is contained in:
parent
49d45a8097
commit
1696b595c6
1 changed files with 43 additions and 22 deletions
|
|
@ -45,9 +45,12 @@ func Example_roots() {
|
|||
if _, err := s.Connect(ctx, t1, nil); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
if _, err := c.Connect(ctx, t2, nil); err != nil {
|
||||
|
||||
clientSession, err := c.Connect(ctx, t2, nil)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
defer clientSession.Close()
|
||||
|
||||
// ...and add a root. The server is notified about the change.
|
||||
c.AddRoots(&mcp.Root{URI: "file://b"})
|
||||
|
|
|
|||
Loading…
Reference in a new issue