From 97509833e22a1e0a0baae378fa987bcc40ab51ec Mon Sep 17 00:00:00 2001 From: caoming Date: Thu, 14 Mar 2019 11:14:43 +0800 Subject: [PATCH] integration: use cancel instead of close. --- integration/v3_alarm_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/integration/v3_alarm_test.go b/integration/v3_alarm_test.go index 0763c9b02..7d9adf956 100644 --- a/integration/v3_alarm_test.go +++ b/integration/v3_alarm_test.go @@ -88,8 +88,8 @@ func TestV3StorageQuotaApply(t *testing.T) { } } - ctx, close := context.WithTimeout(context.TODO(), RequestWaitTimeout) - defer close() + ctx, cancel := context.WithTimeout(context.TODO(), RequestWaitTimeout) + defer cancel() // small quota machine should reject put if _, err := kvc0.Put(ctx, &pb.PutRequest{Key: key, Value: smallbuf}); err == nil {