From 1332113c02703c45faea4c579937b6be416335e0 Mon Sep 17 00:00:00 2001 From: Jayant Shrivastava Date: Fri, 2 Jun 2023 17:17:29 -0400 Subject: [PATCH] do not merge: force parquet when possible during tests This change will not be merged. When it is possible for tests to use parquet, this change forces them to use parquet. This change also forces tests for updated timestamps and mvcc timestamps to use the cloudstorage sink + parquet format. Release note: None Epic: None --- pkg/ccl/changefeedccl/changefeed_test.go | 8 ++++---- pkg/ccl/changefeedccl/helpers_test.go | 3 +++ pkg/ccl/changefeedccl/testfeed_test.go | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pkg/ccl/changefeedccl/changefeed_test.go b/pkg/ccl/changefeedccl/changefeed_test.go index ef87dadc34c7..8b5e6a136ace 100644 --- a/pkg/ccl/changefeedccl/changefeed_test.go +++ b/pkg/ccl/changefeedccl/changefeed_test.go @@ -880,7 +880,7 @@ func TestChangefeedTimestamps(t *testing.T) { sqlDB.Exec(t, `CREATE TABLE foo (a INT PRIMARY KEY)`) sqlDB.Exec(t, `INSERT INTO foo VALUES (0)`) - foo := feed(t, f, `CREATE CHANGEFEED FOR foo WITH updated, resolved`) + foo := feed(t, f, `CREATE CHANGEFEED FOR foo WITH updated, resolved, format=parquet`) defer closeFeed(t, foo) // Grab the first non resolved-timestamp row. @@ -927,7 +927,7 @@ func TestChangefeedTimestamps(t *testing.T) { } } - cdcTest(t, testFn) + cdcTest(t, testFn, feedTestForceSink("cloudstorage")) } func TestChangefeedMVCCTimestamps(t *testing.T) { @@ -950,12 +950,12 @@ func TestChangefeedMVCCTimestamps(t *testing.T) { id, mvccTimestamp) } - changeFeed := feed(t, f, `CREATE CHANGEFEED FOR mvcc_timestamp_test_table WITH mvcc_timestamp`) + changeFeed := feed(t, f, `CREATE CHANGEFEED FOR mvcc_timestamp_test_table WITH mvcc_timestamp, format=parquet`) defer closeFeed(t, changeFeed) assertPayloads(t, changeFeed, expectedPayloads) } - cdcTest(t, testFn) + cdcTest(t, testFn, feedTestForceSink("cloudstorage")) } func TestChangefeedResolvedFrequency(t *testing.T) { diff --git a/pkg/ccl/changefeedccl/helpers_test.go b/pkg/ccl/changefeedccl/helpers_test.go index 194f4011e234..35f57a3a3950 100644 --- a/pkg/ccl/changefeedccl/helpers_test.go +++ b/pkg/ccl/changefeedccl/helpers_test.go @@ -852,6 +852,9 @@ func randomSinkTypeWithOptions(options feedTestOptions) string { for _, sinkType := range options.allowedSinkTypes { sinkWeights[sinkType] = 1 } + if _, ok := sinkWeights["cloudstorage"]; ok { + sinkWeights = map[string]int{"cloudstorage": 1} + } } if options.disabledSinkTypes != nil { for _, sinkType := range options.disabledSinkTypes { diff --git a/pkg/ccl/changefeedccl/testfeed_test.go b/pkg/ccl/changefeedccl/testfeed_test.go index c5df6e32538d..da4cbf4a2281 100644 --- a/pkg/ccl/changefeedccl/testfeed_test.go +++ b/pkg/ccl/changefeedccl/testfeed_test.go @@ -1072,7 +1072,7 @@ func (f *cloudFeedFactory) Feed( } } randNum := rand.Intn(5) - if randNum < 2 { + if randNum < 0 { parquetPossible = false } if parquetPossible {