From ff874ef385ad543f3bbf9e441aaf7db80e10d861 Mon Sep 17 00:00:00 2001 From: rahulpinto19 Date: Mon, 2 Feb 2026 13:30:55 +0000 Subject: [PATCH] test --- tests/common.go | 9 +++++---- tests/postgres/postgres_integration_test.go | 2 -- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/common.go b/tests/common.go index 6e4f60b493..84a13ebcc5 100644 --- a/tests/common.go +++ b/tests/common.go @@ -615,7 +615,7 @@ func GetMySQLWants() (string, string, string, string) { // compatible with postgres-sql tool func SetupPostgresSQLTable(t *testing.T, ctx context.Context, pool *pgxpool.Pool, createStatement, insertStatement, tableName string, params []any) func(*testing.T) { - t.Fatalf("return failure for the teardwon1 testing fro the tesetcleanup") + err := pool.Ping(ctx) if err != nil { t.Fatalf("unable to connect to test database: %s", err) @@ -623,9 +623,10 @@ func SetupPostgresSQLTable(t *testing.T, ctx context.Context, pool *pgxpool.Pool // Create table _, err = pool.Query(ctx, createStatement) - if err != nil { - t.Fatalf("unable to create test table %s: %s", tableName, err) - } + // if err != nil { + // t.Fatalf("unable to create test table %s: %s", tableName, err) + // } + t.Fatalf("unable to create test table %s: %s", tableName, err) // Insert test data _, err = pool.Query(ctx, insertStatement, params...) diff --git a/tests/postgres/postgres_integration_test.go b/tests/postgres/postgres_integration_test.go index 68d3b18304..723d36a535 100644 --- a/tests/postgres/postgres_integration_test.go +++ b/tests/postgres/postgres_integration_test.go @@ -96,7 +96,6 @@ func TestPostgres(t *testing.T) { // cleanup test environment // tests.CleanupPostgresTables(t, ctx, pool) t.Cleanup(func() { - fmt.Println("this is executed after the failure"); tests.CleanupPostgresTables(t, context.Background(), pool) }) @@ -108,7 +107,6 @@ func TestPostgres(t *testing.T) { // set up data for param tool createParamTableStmt, insertParamTableStmt, paramToolStmt, idParamToolStmt, nameParamToolStmt, arrayToolStmt, paramTestParams := tests.GetPostgresSQLParamToolInfo(tableNameParam) teardownTable1 := tests.SetupPostgresSQLTable(t, ctx, pool, createParamTableStmt, insertParamTableStmt, tableNameParam, paramTestParams) - fmt.Println("here passing error in teardownTable1"); defer teardownTable1(t) // set up data for auth tool