Skip to content

Commit

Permalink
Fixed context cancel function issue
Browse files Browse the repository at this point in the history
  • Loading branch information
dedalusj committed Sep 17, 2018
1 parent ee55b01 commit 880f8ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion monitor/monitor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ func TestRun(t *testing.T) {
Client: mockClient,
}

ctx, _ := context.WithTimeout(context.Background(), time.Millisecond*25)
ctx, cancel := context.WithTimeout(context.Background(), time.Millisecond*25)
defer cancel()
err := Run(c, ctx)

assert.NoError(t, err)
Expand Down

0 comments on commit 880f8ec

Please sign in to comment.