test: DRY scache/config sleep in io tests

Also increase schema cache sleep to 0.2 as 0.1 tends to fail in CI.
This commit is contained in:
steve-chavez
2023-10-20 17:53:54 -05:00
committed by Steve Chavez
parent 54786a6c04
commit eb238ad678
2 changed files with 31 additions and 16 deletions
+15
View File
@@ -17,6 +17,21 @@ import requests_unixsocket
from config import *
def sleep_until_postgrest_scache_reload():
"Sleep until schema cache reload"
time.sleep(0.2)
def sleep_until_postgrest_config_reload():
"Sleep until config reload"
time.sleep(0.1)
def sleep_until_postgrest_full_reload():
"Sleep until schema cache plus config reload"
time.sleep(0.2)
class PostgrestTimedOut(Exception):
"Connecting to PostgREST endpoint timed out."