diff --git a/server/cluster/cluster_test.go b/server/cluster/cluster_test.go index fa1b14d107e..94456f236f6 100644 --- a/server/cluster/cluster_test.go +++ b/server/cluster/cluster_test.go @@ -609,7 +609,10 @@ func TestRegionHeartbeatHotStat(t *testing.T) { re.NoError(err) cluster := newTestRaftCluster(ctx, mockid.NewIDAllocator(), opt, storage.NewStorageWithMemoryBackend()) cluster.coordinator = schedule.NewCoordinator(ctx, cluster, nil) - newTestStores(4, "2.0.0") + stores := newTestStores(4, "2.0.0") + for _, store := range stores { + cluster.PutStore(store) + } peers := []*metapb.Peer{ { Id: 1,