From 7de2363370eb29f7aaddf7141493ed0797366b20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Tue, 5 Mar 2024 04:02:40 +0000 Subject: [PATCH] do not flip that bool --- flow/e2e/congen.go | 34 +++++++++++--------------- flow/e2e/postgres/qrep_flow_pg_test.go | 2 +- flow/e2e/test_utils.go | 5 +--- 3 files changed, 16 insertions(+), 25 deletions(-) diff --git a/flow/e2e/congen.go b/flow/e2e/congen.go index 603c6f0b7e..82387c9ff3 100644 --- a/flow/e2e/congen.go +++ b/flow/e2e/congen.go @@ -218,25 +218,19 @@ type QRepFlowConnectionGenerationConfig struct { // GenerateQRepConfig generates a qrep config for testing. func (c *QRepFlowConnectionGenerationConfig) GenerateQRepConfig( query string, watermark string, -) (*protos.QRepConfig, error) { - ret := &protos.QRepConfig{} - ret.FlowJobName = c.FlowJobName - ret.WatermarkTable = c.WatermarkTable - ret.DestinationTableIdentifier = c.DestinationTableIdentifier - - postgresPeer := GeneratePostgresPeer() - ret.SourcePeer = postgresPeer - - ret.DestinationPeer = c.Destination - - ret.Query = query - ret.WatermarkColumn = watermark - - ret.StagingPath = c.StagingPath - ret.WriteMode = &protos.QRepWriteMode{ - WriteType: protos.QRepWriteType_QREP_WRITE_MODE_APPEND, +) *protos.QRepConfig { + return &protos.QRepConfig{ + FlowJobName: c.FlowJobName, + WatermarkTable: c.WatermarkTable, + DestinationTableIdentifier: c.DestinationTableIdentifier, + SourcePeer: GeneratePostgresPeer(), + DestinationPeer: c.Destination, + Query: query, + WatermarkColumn: watermark, + StagingPath: c.StagingPath, + WriteMode: &protos.QRepWriteMode{ + WriteType: protos.QRepWriteType_QREP_WRITE_MODE_APPEND, + }, + NumRowsPerPartition: 1000, } - ret.NumRowsPerPartition = 1000 - - return ret, nil } diff --git a/flow/e2e/postgres/qrep_flow_pg_test.go b/flow/e2e/postgres/qrep_flow_pg_test.go index 849e74024a..fb49d3d242 100644 --- a/flow/e2e/postgres/qrep_flow_pg_test.go +++ b/flow/e2e/postgres/qrep_flow_pg_test.go @@ -347,7 +347,7 @@ func (s PeerFlowE2ETestSuitePG) Test_Pause() { query, e2e.GeneratePostgresPeer(), "", - false, + true, "_PEERDB_SYNCED_AT", ) require.NoError(s.t, err) diff --git a/flow/e2e/test_utils.go b/flow/e2e/test_utils.go index 92d04d1f3d..8592eb406e 100644 --- a/flow/e2e/test_utils.go +++ b/flow/e2e/test_utils.go @@ -396,10 +396,7 @@ func CreateQRepWorkflowConfig( watermark := "updated_at" - qrepConfig, err := connectionGen.GenerateQRepConfig(query, watermark) - if err != nil { - return nil, err - } + qrepConfig := connectionGen.GenerateQRepConfig(query, watermark) qrepConfig.InitialCopyOnly = true qrepConfig.SyncedAtColName = syncedAtCol qrepConfig.SetupWatermarkTableOnDestination = setupDst