diff --git a/pkg/sql/importer/import_mvcc_test.go b/pkg/sql/importer/import_mvcc_test.go index 1fb692231743..9b979471fbcc 100644 --- a/pkg/sql/importer/import_mvcc_test.go +++ b/pkg/sql/importer/import_mvcc_test.go @@ -18,7 +18,6 @@ import ( "testing" "github.com/cockroachdb/cockroach/pkg/base" - "github.com/cockroachdb/cockroach/pkg/keys" "github.com/cockroachdb/cockroach/pkg/kv" "github.com/cockroachdb/cockroach/pkg/kv/kvclient/kvcoord" "github.com/cockroachdb/cockroach/pkg/kv/kvpb" @@ -37,12 +36,9 @@ func TestMVCCValueHeaderImportEpoch(t *testing.T) { defer leaktest.AfterTest(t)() defer log.Scope(t).Close(t) - defer leaktest.AfterTest(t)() - defer log.Scope(t).Close(t) - + ctx := context.Background() server, db, _ := serverutils.StartServer(t, base.TestServerArgs{}) s := server.ApplicationLayer() - ctx := context.Background() defer server.Stopper().Stop(ctx) sqlDB := sqlutils.MakeSQLRunner(db) @@ -66,7 +62,7 @@ func TestMVCCValueHeaderImportEpoch(t *testing.T) { sqlDB.QueryRow(t, `SELECT id FROM system.namespace WHERE name = $1`, "t").Scan(&tableID) - startKey := keys.SystemSQLCodec.TablePrefix(tableID) + startKey := s.Codec().TablePrefix(tableID) endKey := startKey.PrefixEnd() req := &kvpb.ExportRequest{ diff --git a/pkg/sql/importer/import_processor_test.go b/pkg/sql/importer/import_processor_test.go index cd47e4107830..a1ecc42be252 100644 --- a/pkg/sql/importer/import_processor_test.go +++ b/pkg/sql/importer/import_processor_test.go @@ -368,7 +368,7 @@ func TestImportHonorsResumePosition(t *testing.T) { Mon: evalCtx.TestingMon, Cfg: &execinfra.ServerConfig{ JobRegistry: &jobs.Registry{}, - Settings: &cluster.Settings{}, + Settings: cluster.MakeTestingClusterSettings(), ExternalStorage: externalStorageFactory, DB: fakeDB{}, BulkAdder: func( @@ -502,7 +502,7 @@ func TestImportHandlesDuplicateKVs(t *testing.T) { Mon: evalCtx.TestingMon, Cfg: &execinfra.ServerConfig{ JobRegistry: &jobs.Registry{}, - Settings: &cluster.Settings{}, + Settings: cluster.MakeTestingClusterSettings(), ExternalStorage: externalStorageFactory, DB: fakeDB{}, BulkAdder: func(