Skip to content

Commit b624c54

Browse files
committed
refactor: replace context.WithCancel with t.Context
Signed-off-by: hongmengning <[email protected]>
1 parent 1b42959 commit b624c54

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

httptransport/client/matcher_test.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package client_test
22

33
import (
4-
"context"
54
"encoding/json"
65
"net/http"
76
"net/http/httptest"
@@ -21,8 +20,7 @@ import (
2120

2221
// TestDiffer puts the Differ methods of the client through its paces.
2322
func TestDiffer(t *testing.T) {
24-
ctx, done := context.WithCancel(context.Background())
25-
defer done()
23+
ctx := t.Context()
2624

2725
t.Run("OK", func(t *testing.T) {
2826
t.Run("Delete", func(t *testing.T) {

0 commit comments

Comments
 (0)