Преглед изворни кода

Merge pull request #10542 from johncming/usecancel

integration: use cancel instead of close.
Xiang Li пре 7 година
родитељ
комит
2d9b32dc3d
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 {