Skip to content

Commit

Permalink
do not flip that bool
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Mar 5, 2024
1 parent 74baf80 commit 7de2363
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 25 deletions.
34 changes: 14 additions & 20 deletions flow/e2e/congen.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
2 changes: 1 addition & 1 deletion flow/e2e/postgres/qrep_flow_pg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ func (s PeerFlowE2ETestSuitePG) Test_Pause() {
query,
e2e.GeneratePostgresPeer(),
"",
false,
true,
"_PEERDB_SYNCED_AT",
)
require.NoError(s.t, err)
Expand Down
5 changes: 1 addition & 4 deletions flow/e2e/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7de2363

Please sign in to comment.