From 3c1af75ef7e6d74807ffa5e199873c6d906dfe70 Mon Sep 17 00:00:00 2001 From: Boyang Lyu Date: Fri, 16 Aug 2024 14:15:18 +0800 Subject: [PATCH] add a comment Signed-off-by: Boyang Lyu --- tests/integrations/client/http_client_test.go | 4 ++-- tools/pd-ctl/tests/safepoint/safepoint_test.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integrations/client/http_client_test.go b/tests/integrations/client/http_client_test.go index 982cb18f1d80..e80679290ea5 100644 --- a/tests/integrations/client/http_client_test.go +++ b/tests/integrations/client/http_client_test.go @@ -899,8 +899,8 @@ func (suite *httpClientTestSuite) TestGetGCSafePoint() { re.Equal("Delete service GC safepoint successfully.", msg) } - _, err4 := client.DeleteGCSafePoint(ctx, "gc_worker") - re.Error(err4) + _, err = client.DeleteGCSafePoint(ctx, "gc_worker") + re.Error(err) // check that the safepoitns are indeed deleted l, err = client.GetGCSafePoint(ctx) diff --git a/tools/pd-ctl/tests/safepoint/safepoint_test.go b/tools/pd-ctl/tests/safepoint/safepoint_test.go index 3a46e326e609..4538a226fea3 100644 --- a/tools/pd-ctl/tests/safepoint/safepoint_test.go +++ b/tools/pd-ctl/tests/safepoint/safepoint_test.go @@ -125,6 +125,6 @@ func TestSafepoint(t *testing.T) { output, err = tests.ExecuteCommand(cmd, args...) re.NoError(err) - // try again + // output should be an error message re.Equal("Failed to delete service GC safepoint: request pd http api failed with status: '500 Internal Server Error', body: '\"cannot remove service safe point of gc_worker\"'\n", string(output)) }