Skip to content

Commit

Permalink
test fixup cockroachdb#1
Browse files Browse the repository at this point in the history
  • Loading branch information
stevendanna committed Mar 5, 2024
1 parent f77d472 commit 5e7414e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
8 changes: 2 additions & 6 deletions pkg/sql/importer/import_mvcc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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)

Expand All @@ -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{
Expand Down
4 changes: 2 additions & 2 deletions pkg/sql/importer/import_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 5e7414e

Please sign in to comment.