Skip to content

Commit

Permalink
fix unit test in unified sorter
Browse files Browse the repository at this point in the history
  • Loading branch information
amyangfei committed Mar 27, 2023
1 parent 56f7f37 commit d963c5e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cdc/sorter/unified/backend_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"time"

"github.com/pingcap/failpoint"
"github.com/pingcap/tidb/util/memory"
"github.com/pingcap/tiflow/pkg/config"
"github.com/pingcap/tiflow/pkg/fsutil"
"github.com/pingcap/tiflow/pkg/util"
"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -313,11 +313,11 @@ func TestCleanUpStaleLockNoPermission(t *testing.T) {
// getting the current system memory pressure. Such a failure is usually caused by a lack of file descriptor quota
// set by the operating system.
func TestGetMemoryPressureFailure(t *testing.T) {
origin := util.MemTotal
origin := memory.MemTotal
defer func() {
util.MemTotal = origin
memory.MemTotal = origin
}()
util.MemTotal = func() (uint64, error) { return 0, nil }
memory.MemTotal = func() (uint64, error) { return 0, nil }

dir := t.TempDir()
backEndPool, err := newBackEndPool(dir)
Expand Down

0 comments on commit d963c5e

Please sign in to comment.