Merge pull request #10542 from johncming/usecancel

integration: use cancel instead of close.
This commit is contained in:
Xiang Li 2019-03-19 14:19:32 -07:00 committed by GitHub
commit 2d9b32dc3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {