Skip to content

Commit

Permalink
MAINT: Give psql container the same debug treatment as DAV (belongs to
Browse files Browse the repository at this point in the history
  • Loading branch information
wosc committed Feb 15, 2024
1 parent 4e5ab0b commit 5a20e63
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/zeit/connector/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def setUp(self):
self['dsn'] = f'postgresql://postgres:postgres@localhost:{port}'
self.wait_for_startup(self['dsn'])

def wait_for_startup(self, dsn, timeout=5, sleep=0.2):
def wait_for_startup(self, dsn, timeout=10, sleep=0.2):
engine = sqlalchemy.create_engine(dsn)
slept = 0
while slept < timeout:
Expand All @@ -173,6 +173,7 @@ def wait_for_startup(self, dsn, timeout=5, sleep=0.2):
else:
engine.dispose()
return
print(self['psql_container'].logs(timestamps=True).decode('utf-8'))
raise RuntimeError('%s did not start up' % dsn)

def tearDown(self):
Expand Down

0 comments on commit 5a20e63

Please sign in to comment.