Purge opened connections on retries during tests (#4452)

This commit is contained in:
Calvin Leung Huang
2018-04-26 11:28:58 -04:00
committed by GitHub
parent 783a5c3422
commit 6fc57a91d8
7 changed files with 7 additions and 0 deletions

View File

@@ -50,6 +50,7 @@ func preparePostgresTestContainer(t *testing.T) (cleanup func(), retURL string)
if err != nil {
return err
}
defer db.Close()
return db.Ping()
}); err != nil {
t.Fatalf("Could not connect to PostgreSQL docker container: %s", err)