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:
parent
958088f83b
commit
1a54253acd
|
@ -158,7 +158,8 @@ func TestBrowserQuit(t *testing.T) {
|
||||||
|
|
||||||
// Run should error with something other than "deadline exceeded" in
|
// Run should error with something other than "deadline exceeded" in
|
||||||
// much less than 5s.
|
// 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 {
|
switch err := Run(ctx2, Navigate(s.URL)); err {
|
||||||
case nil:
|
case nil:
|
||||||
t.Fatal("did not expect a nil error")
|
t.Fatal("did not expect a nil error")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user