Skip to content

Commit

Permalink
use uber gomock
Browse files Browse the repository at this point in the history
  • Loading branch information
D3Hunter committed Aug 25, 2023
1 parent 0114b1a commit 094227f
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ mock_lightning:
@mockgen -package mocklocal github.com/pingcap/tidb/br/pkg/lightning/backend/local DiskUsage,TiKVModeSwitcher > br/pkg/mock/mocklocal/local.go
@mockgen -package mock github.com/pingcap/tidb/br/pkg/utils TaskRegister > br/pkg/mock/task_register.go

mockgen:
gen_mock:
@mockgen -package mock github.com/pingcap/tidb/disttask/framework/scheduler TaskTable,SubtaskExecutor,Pool,Scheduler,InternalScheduler > disttask/framework/mock/scheduler_mock.go

# There is no FreeBSD environment for GitHub actions. So cross-compile on Linux
Expand Down
2 changes: 1 addition & 1 deletion br/pkg/mock/mocklocal/local.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion disttask/framework/mock/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ go_library(
visibility = ["//visibility:public"],
deps = [
"//disttask/framework/proto",
"@com_github_golang_mock//gomock",
"@org_uber_go_mock//gomock",
],
)
2 changes: 1 addition & 1 deletion disttask/framework/mock/scheduler_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion disttask/framework/scheduler/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ go_test(
"//disttask/framework/proto",
"//resourcemanager/pool/spool",
"//resourcemanager/util",
"@com_github_golang_mock//gomock",
"@com_github_pingcap_failpoint//:failpoint",
"@com_github_pkg_errors//:errors",
"@com_github_stretchr_testify//require",
"@org_uber_go_mock//gomock",
],
)
2 changes: 1 addition & 1 deletion disttask/framework/scheduler/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ import (
"testing"
"time"

"github.com/golang/mock/gomock"
"github.com/pingcap/tidb/disttask/framework/mock"
"github.com/pingcap/tidb/disttask/framework/proto"
"github.com/pingcap/tidb/resourcemanager/pool/spool"
"github.com/pingcap/tidb/resourcemanager/util"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
)

func getPoolRunFn() (*sync.WaitGroup, func(f func()) error) {
Expand Down
2 changes: 1 addition & 1 deletion disttask/framework/scheduler/scheduler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ import (
"testing"
"time"

"github.com/golang/mock/gomock"
"github.com/pingcap/failpoint"
"github.com/pingcap/tidb/disttask/framework/mock"
"github.com/pingcap/tidb/disttask/framework/proto"
"github.com/pkg/errors"
"github.com/stretchr/testify/require"
"go.uber.org/mock/gomock"
)

func getRunWithConcurrencyFn() (*sync.WaitGroup, func(funcs chan func(), _ uint32) error) {
Expand Down

0 comments on commit 094227f

Please sign in to comment.