瀏覽代碼

integration: use cancel instead of close.

caoming 6 年之前
父節點
當前提交
97509833e2
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      integration/v3_alarm_test.go

+ 2 - 2
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 {