Skip to content

Commit

Permalink
print debug
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Mar 16, 2024
1 parent a2cc30c commit 2415cba
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion flow/e2e/postgres/qrep_flow_pg_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,47 @@ func (s PeerFlowE2ETestSuitePG) setupSourceTable(tableName string, rowCount int)

func (s PeerFlowE2ETestSuitePG) comparePGTables(srcSchemaQualified, dstSchemaQualified, selector string) error {
// Execute the two EXCEPT queries
return errors.Join(
err := errors.Join(
s.compareQuery(srcSchemaQualified, dstSchemaQualified, selector),
s.compareQuery(dstSchemaQualified, srcSchemaQualified, selector),
)
if err != nil {
{
query := fmt.Sprintf("SELECT %s FROM %s ORDER BY id", selector, srcSchemaQualified)
rows, err := s.Conn().Query(context.Background(), query, pgx.QueryExecModeExec)
if err != nil {
return err
}
defer rows.Close()
i := 0
for rows.Next() {
values, err := rows.Values()
if err != nil {
return err
}
i += 1
s.T().Log("+++", i, srcSchemaQualified, values)
}
}
{
query := fmt.Sprintf("SELECT %s FROM %s ORDER BY id", selector, srcSchemaQualified)
rows, err := s.Conn().Query(context.Background(), query, pgx.QueryExecModeExec)
if err != nil {
return err
}
defer rows.Close()
i := 0
for rows.Next() {
values, err := rows.Values()
if err != nil {
return err
}
i += 1
s.T().Log("+++", i, dstSchemaQualified, values)
}
}
}
return err
}

func (s PeerFlowE2ETestSuitePG) checkEnums(srcSchemaQualified, dstSchemaQualified string) error {
Expand Down

0 comments on commit 2415cba

Please sign in to comment.