From d963c5e92dc30fb68420d61a9a832f8d6d941d43 Mon Sep 17 00:00:00 2001 From: amyangfei Date: Mon, 27 Mar 2023 12:06:03 +0800 Subject: [PATCH] fix unit test in unified sorter --- cdc/sorter/unified/backend_pool_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cdc/sorter/unified/backend_pool_test.go b/cdc/sorter/unified/backend_pool_test.go index d448a9beb3c..356cd7525af 100644 --- a/cdc/sorter/unified/backend_pool_test.go +++ b/cdc/sorter/unified/backend_pool_test.go @@ -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" ) @@ -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)