Skip to content

Commit

Permalink
Merge #104186
Browse files Browse the repository at this point in the history
104186: backupccl: add log.Scope to tests r=stevendanna a=stevendanna

This helps keep the log output clean.

Epic: none

Release note: None

Co-authored-by: Steven Danna <[email protected]>
  • Loading branch information
craig[bot] and stevendanna committed Jun 8, 2023
2 parents 84e7dd8 + afc9ed9 commit 9075251
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/sql/sem/eval"
"github.com/cockroachdb/cockroach/pkg/util/hlc"
"github.com/cockroachdb/cockroach/pkg/util/leaktest"
"github.com/cockroachdb/cockroach/pkg/util/log"
"github.com/cockroachdb/cockroach/pkg/util/protoutil"
"github.com/stretchr/testify/require"
)
Expand All @@ -37,6 +38,7 @@ import (
// interrupt the function.
func TestRunGenerativeSplitAndScatterContextCancel(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)

const numAccounts = 1000
const localFoo = "nodelocal://1/foo"
Expand Down Expand Up @@ -129,6 +131,7 @@ func TestRunGenerativeSplitAndScatterContextCancel(t *testing.T) {
// that we've already seen before.
func TestRunGenerativeSplitAndScatterRandomizedDestOnFailScatter(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)

const numAccounts = 1000
const localFoo = "nodelocal://0/foo"
Expand Down
3 changes: 3 additions & 0 deletions pkg/ccl/backupccl/restore_data_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/util/hlc"
"github.com/cockroachdb/cockroach/pkg/util/leaktest"
"github.com/cockroachdb/cockroach/pkg/util/limit"
"github.com/cockroachdb/cockroach/pkg/util/log"
"github.com/cockroachdb/cockroach/pkg/util/mon"
"github.com/cockroachdb/cockroach/pkg/util/timeutil"
"github.com/cockroachdb/pebble/sstable"
Expand Down Expand Up @@ -150,6 +151,8 @@ func clientKVsToEngineKVs(kvs []kv.KeyValue) []storage.MVCCKeyValue {

func TestIngest(t *testing.T) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)

ctx := context.Background()
t.Run("batch=default", func(t *testing.T) {
runTestIngest(t, func(_ *cluster.Settings) {})
Expand Down

0 comments on commit 9075251

Please sign in to comment.