diff --git a/pkg/sql/copy/BUILD.bazel b/pkg/sql/copy/BUILD.bazel index c93608860020..7fc5e137ad11 100644 --- a/pkg/sql/copy/BUILD.bazel +++ b/pkg/sql/copy/BUILD.bazel @@ -32,6 +32,7 @@ go_test( "//pkg/testutils", "//pkg/testutils/datapathutils", "//pkg/testutils/serverutils", + "//pkg/testutils/skip", "//pkg/testutils/sqlutils", "//pkg/testutils/testcluster", "//pkg/util/ctxgroup", diff --git a/pkg/sql/copy/copy_test.go b/pkg/sql/copy/copy_test.go index e82f3355f9ec..d75aaeb2e44e 100644 --- a/pkg/sql/copy/copy_test.go +++ b/pkg/sql/copy/copy_test.go @@ -40,6 +40,7 @@ import ( "github.com/cockroachdb/cockroach/pkg/testutils" "github.com/cockroachdb/cockroach/pkg/testutils/datapathutils" "github.com/cockroachdb/cockroach/pkg/testutils/serverutils" + "github.com/cockroachdb/cockroach/pkg/testutils/skip" "github.com/cockroachdb/cockroach/pkg/testutils/sqlutils" "github.com/cockroachdb/cockroach/pkg/util/ctxgroup" "github.com/cockroachdb/cockroach/pkg/util/encoding" @@ -653,6 +654,8 @@ const lineitemSchemaMunged string = `CREATE TABLE lineitem ( func TestLargeCopy(t *testing.T) { defer leaktest.AfterTest(t)() defer log.Scope(t).Close(t) + // This test can cause timeouts. + skip.UnderRace(t) ctx := context.Background() s, _, kvdb := serverutils.StartServer(t, base.TestServerArgs{}) @@ -673,7 +676,7 @@ func TestLargeCopy(t *testing.T) { require.NoError(t, err) rng := rand.New(rand.NewSource(0)) - rows := 10000 + rows := 100 numrows, err := conn.GetDriverConn().CopyFrom(ctx, ©Reader{rng: rng, cols: desc.PublicColumns(), rows: rows}, "COPY lineitem FROM STDIN WITH CSV;")