From 0306cec14cf8980b36db562c90650fc882ead5ee Mon Sep 17 00:00:00 2001 From: lance6716 Date: Thu, 28 Dec 2023 13:27:21 +0800 Subject: [PATCH] add another test Signed-off-by: lance6716 --- br/pkg/lightning/backend/local/local_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/br/pkg/lightning/backend/local/local_test.go b/br/pkg/lightning/backend/local/local_test.go index 780d3c621dcd5..f45d6324b82f1 100644 --- a/br/pkg/lightning/backend/local/local_test.go +++ b/br/pkg/lightning/backend/local/local_test.go @@ -2386,4 +2386,9 @@ func TestCheckDiskAvail(t *testing.T) { ctx := context.Background() err := checkDiskAvail(ctx, store) require.NoError(t, err) + + // pd may return this StoreInfo before the store reports heartbeat + store = &http.StoreInfo{Status: http.StoreStatus{LeaderWeight: 1.0, RegionWeight: 1.0}} + err = checkDiskAvail(ctx, store) + require.NoError(t, err) }