Skip to content

Commit

Permalink
backupccl: unskip TestIngest
Browse files Browse the repository at this point in the history
The issue here was that we recently added a log.Scope(t).Close(t) call
to this test. However, log.Scope(t) creates a goroutine that is only
cleaned up when the defer is called. As a result a leaktest inside the
given subtests failed.

Here, we move the log scope into the subtest as well.

Fixes #104639

Release note: None
  • Loading branch information
stevendanna committed Jun 12, 2023
1 parent 9c2f650 commit 23ab824
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions pkg/ccl/backupccl/restore_data_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ import (
"github.com/cockroachdb/cockroach/pkg/storage"
"github.com/cockroachdb/cockroach/pkg/testutils"
"github.com/cockroachdb/cockroach/pkg/testutils/serverutils"
"github.com/cockroachdb/cockroach/pkg/testutils/skip"
"github.com/cockroachdb/cockroach/pkg/util/encoding"
"github.com/cockroachdb/cockroach/pkg/util/hlc"
"github.com/cockroachdb/cockroach/pkg/util/leaktest"
Expand Down Expand Up @@ -152,9 +151,6 @@ func clientKVsToEngineKVs(kvs []kv.KeyValue) []storage.MVCCKeyValue {

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

skip.WithIssue(t, 104639, "flaky test")

ctx := context.Background()
t.Run("batch=default", func(t *testing.T) {
Expand All @@ -172,6 +168,7 @@ func TestIngest(t *testing.T) {

func runTestIngest(t *testing.T, init func(*cluster.Settings)) {
defer leaktest.AfterTest(t)()
defer log.Scope(t).Close(t)

dir, dirCleanupFn := testutils.TempDir(t)
defer dirCleanupFn()
Expand Down

0 comments on commit 23ab824

Please sign in to comment.