Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test/e2e: do not share chromedp allocators (#6567)
Tests crash sometimes now with: ``` panic: close of closed channel goroutine 1793 [running]: github.com/chromedp/chromedp.(*ExecAllocator).Allocate.func2() /home/runner/go/pkg/mod/github.com/chromedp/chromedp@v0.8.2/allocate.go:224 +0xca created by github.com/chromedp/chromedp.(*ExecAllocator).Allocate /home/runner/go/pkg/mod/github.com/chromedp/chromedp@v0.8.2/allocate.go:210 +0xd05 ``` context.Background() returns the same context for each call and chromedp shares allocators using that context. If we are unfortunate then they both try to close a channel at the same time. Try to workaround this by allocating a context for each checkNetworkRequests call. Signed-off-by: Giedrius Statkevičius <giedrius.statkevicius@vinted.com>
- Loading branch information