From 4d169481cc184f8e4cf18816288a6078cc79bd76 Mon Sep 17 00:00:00 2001 From: neelasha23 Date: Wed, 24 Jan 2024 17:52:40 +0530 Subject: [PATCH] check ex --- .github/workflows/ci.yaml | 1 - src/sql/_testing.py | 27 +++++++++++++++------------ 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a9a440779..f95547e10 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -76,7 +76,6 @@ jobs: needs: [preliminary] if: needs.preliminary.outputs.check_doc_modified == 'failure' uses: ./.github/workflows/ci-integration-db-sqlalchemy-v1.yaml - secrets: inherit integration-test-non-live: needs: [preliminary] diff --git a/src/sql/_testing.py b/src/sql/_testing.py index 041994e28..9f61337cd 100644 --- a/src/sql/_testing.py +++ b/src/sql/_testing.py @@ -510,18 +510,21 @@ def clickhouse(is_bypass_init=False, print_credentials=False): yield curr except docker.errors.NotFound: print("Creating new container: clickhouse") - with new_container( - new_container_name=db_config["docker_ct"]["name"], - image_name=db_config["docker_ct"]["image"], - ports=db_config["docker_ct"]["ports"], - environment={ - "CLICKHOUSE_USER": db_config["username"], - "CLICKHOUSE_PASSWORD": db_config["password"], - "CLICKHOUSE_DB": db_config["database"], - }, - ready_test=lambda: database_ready(database="clickhouse"), - ) as container: - yield container + try: + with new_container( + new_container_name=db_config["docker_ct"]["name"], + image_name=db_config["docker_ct"]["image"], + ports=db_config["docker_ct"]["ports"], + environment={ + "CLICKHOUSE_USER": db_config["username"], + "CLICKHOUSE_PASSWORD": db_config["password"], + "CLICKHOUSE_DB": db_config["database"], + }, + ready_test=lambda: database_ready(database="clickhouse"), + ) as container: + yield container + except Exception as e: + print(str(e)) def main():