From 2415cba1f6ca495e4d54ec09a80e1ebb70aa3d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philip=20Dub=C3=A9?= Date: Sat, 16 Mar 2024 16:00:16 +0000 Subject: [PATCH] print debug --- flow/e2e/postgres/qrep_flow_pg_test.go | 39 +++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/flow/e2e/postgres/qrep_flow_pg_test.go b/flow/e2e/postgres/qrep_flow_pg_test.go index ec121b8930..5ee253bf0c 100644 --- a/flow/e2e/postgres/qrep_flow_pg_test.go +++ b/flow/e2e/postgres/qrep_flow_pg_test.go @@ -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 {