make vet happy with TestBrowserQuit

It's right that we were leaking a context here, resulting in a timer not
being stopped once the test finished.
This commit is contained in:
Daniel Martí 2019-04-17 13:29:11 +09:00
parent 958088f83b
commit 1a54253acd

View File

@ -158,7 +158,8 @@ func TestBrowserQuit(t *testing.T) {
// Run should error with something other than "deadline exceeded" in
// much less than 5s.
ctx2, _ := context.WithTimeout(ctx, 5*time.Second)
ctx2, cancel := context.WithTimeout(ctx, 5*time.Second)
defer cancel()
switch err := Run(ctx2, Navigate(s.URL)); err {
case nil:
t.Fatal("did not expect a nil error")