fix: listener retries with exponential backoff

Also corrects the admin ready response which now considers the listener
state.
This commit is contained in:
steve-chavez
2024-05-19 20:48:59 -05:00
committed by Steve Chavez
parent bfa4e1bedb
commit 3cf565614d
6 changed files with 92 additions and 68 deletions
+6 -1
View File
@@ -20,7 +20,12 @@ def test_sanity_replica(replicaenv):
response = postgrest.session.get("/items?select=count")
assert response.text == '[{"count":10}]'
with run(env=replicaenv["replica"]) as postgrest:
working_replica_env = {
**replicaenv["replica"],
"PGRST_DB_CHANNEL_ENABLED": "false", # LISTEN doesn't work on read replicas
}
with run(env=working_replica_env) as postgrest:
response = postgrest.session.get("/rpc/is_replica")
assert response.text == "true"