Skip to content

Commit

Permalink
Pulling my hair out trying to figure out why this pool is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
serprex committed Dec 22, 2023
1 parent b44c6a0 commit 325bb89
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
11 changes: 2 additions & 9 deletions flow/e2e/congen.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,8 @@ func SetupPostgres(suffix string) (*pgxpool.Pool, error) {
}

func TearDownPostgres(pool *pgxpool.Pool, suffix string) error {
// drop the e2e_test schema
if pool != nil {
err := cleanPostgres(pool, suffix)
if err != nil {
return err
}
pool.Close()
}
return nil
err := cleanPostgres(pool, suffix)
return err
}

// GeneratePostgresPeer generates a postgres peer config for testing.
Expand Down
1 change: 0 additions & 1 deletion flow/e2e/snowflake/peer_flow_sf_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ func setupSuite(t *testing.T) PeerFlowE2ETestSuiteSF {
return suite
}

// Implement TearDownAllSuite interface to tear down the test suite
func (s PeerFlowE2ETestSuiteSF) TearDownSuite() {
err := e2e.TearDownPostgres(s.pool, s.pgSuffix)
if err != nil {
Expand Down

0 comments on commit 325bb89

Please sign in to comment.