Skip to content

Commit

Permalink
Merge branch 'master' into desc-query-bound
Browse files Browse the repository at this point in the history
  • Loading branch information
tamirms authored Sep 25, 2024
2 parents 8c676b5 + 6fbba33 commit b9b2474
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/horizon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
HORIZON_INTEGRATION_TESTS_CAPTIVE_CORE_USE_DB: true
PROTOCOL_21_CORE_DEBIAN_PKG_VERSION: 21.3.1-2007.4ede19620.focal
PROTOCOL_21_CORE_DOCKER_IMG: stellar/stellar-core:21.3.1-2007.4ede19620.focal
PROTOCOL_21_SOROBAN_RPC_DOCKER_IMG: stellar/soroban-rpc:21.5.0
PROTOCOL_21_SOROBAN_RPC_DOCKER_IMG: stellar/soroban-rpc:21.5.1
PGHOST: localhost
PGPORT: 5432
PGUSER: postgres
Expand Down
6 changes: 4 additions & 2 deletions support/db/dbtest/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,11 @@ func checkReadOnly(t testing.TB, DSN string) {
if !rows.Next() {
_, err = tx.Exec("CREATE ROLE user_ro WITH LOGIN PASSWORD 'user_ro';")
if err != nil {
// Handle race condition by ignoring the error if it's a duplicate key violation
if pqErr, ok := err.(*pq.Error); ok && pqErr.Code == "23505" {
// 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 b9b2474

Please sign in to comment.