Skip to content

Commit

Permalink
Update support/db/dbtest/db.go
Browse files Browse the repository at this point in the history
Co-authored-by: tamirms <tamirms@gmail.com>
  • Loading branch information
urvisavla and tamirms authored Sep 24, 2024
1 parent 333ce27 commit 64f8761
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions support/db/dbtest/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,8 @@ func checkReadOnly(t testing.TB, DSN string) {
// Handle race condition by ignoring the error if it's a duplicate key violation or duplicate object error
if pqErr, ok := err.(*pq.Error); ok && (pqErr.Code == "23505" || pqErr.Code == "42710") {
return
} else if ok {
t.Logf("pq error code: %s", pqErr.Code)
}
}
require.NoError(t, err)
Expand Down

0 comments on commit 64f8761

Please sign in to comment.