Commit d1d2866
Fix browser connection goroutine leaks in tests (#5647)
TestBrowserTypeConnect and TestMultiConnectToSingleBrowser create
browser connections via bt.Connect() but never close them. Since
both contexts are context.Background(), the child goroutines
(Connection, Session, BaseEventEmitter.syncAll, etc.) live forever.
Add t.Cleanup(b.Close) to ensure browsers created via Connect are
properly closed when the test finishes.
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 9710d36 commit d1d2866
2 files changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
| 332 | + | |
332 | 333 | | |
333 | 334 | | |
334 | 335 | | |
335 | 336 | | |
336 | 337 | | |
337 | 338 | | |
338 | 339 | | |
| 340 | + | |
339 | 341 | | |
340 | 342 | | |
341 | 343 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
0 commit comments