Skip to content

Commit

Permalink
add try block
Browse files Browse the repository at this point in the history
  • Loading branch information
colin-ho committed Feb 23, 2024
1 parent f93ae9a commit f0edfde
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/integration/sql/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,9 @@
)
@pytest.fixture(scope="session")
def check_db_server_initialized() -> None:
with sqlalchemy.create_engine(TRINO_URL).connect() as conn:
conn.execute(sqlalchemy.text("SELECT 1"))
try:
with sqlalchemy.create_engine(TRINO_URL).connect() as conn:
conn.execute(sqlalchemy.text("SELECT 1"))
except Exception as e:
print(f"Connection failed with exception: {e}")
raise

0 comments on commit f0edfde

Please sign in to comment.