Skip to content

Commit

Permalink
chore: fix mockPdClient
Browse files Browse the repository at this point in the history
Signed-off-by: ekexium <eke@fastmail.com>
  • Loading branch information
ekexium committed Mar 13, 2024
1 parent d6da3c1 commit d97c141
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions br/pkg/lightning/backend/local/local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,10 @@ func (c *mockPdClient) GetTS(ctx context.Context) (int64, int64, error) {
return 1, 2, nil
}

func (c *mockPdClient) GetClusterID(ctx context.Context) uint64 {
return 1
}

type mockGrpcErr struct{}

func (e mockGrpcErr) GRPCStatus() *status.Status {
Expand Down
4 changes: 4 additions & 0 deletions br/pkg/streamhelper/basic_lib_for_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -752,6 +752,10 @@ func (p *mockPDClient) GetStore(_ context.Context, storeID uint64) (*metapb.Stor
}, nil
}

func (p *mockPDClient) GetClusterID(ctx context.Context) uint64 {
return 1
}

func newMockRegion(regionID uint64, startKey []byte, endKey []byte) *pd.Region {
leader := &metapb.Peer{
Id: regionID,
Expand Down

0 comments on commit d97c141

Please sign in to comment.