From a433c31d6ebae79bd5b281653551899b7369067c Mon Sep 17 00:00:00 2001 From: Kshitij Aranke Date: Wed, 2 Aug 2023 16:56:16 +0100 Subject: [PATCH] Fix #7179 (#8279) --- core/dbt/exceptions.py | 2 +- tests/functional/compile/test_compile.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/core/dbt/exceptions.py b/core/dbt/exceptions.py index 339c1c744bd..e9c3ad93402 100644 --- a/core/dbt/exceptions.py +++ b/core/dbt/exceptions.py @@ -486,7 +486,7 @@ def __init__(self, thread_id, known: List): self.thread_id = thread_id self.known = known super().__init__( - msg="connection never acquired for thread {self.thread_id}, have {self.known}" + msg=f"connection never acquired for thread {self.thread_id}, have {self.known}" ) diff --git a/tests/functional/compile/test_compile.py b/tests/functional/compile/test_compile.py index 9f21c8d4538..86c747cde8f 100644 --- a/tests/functional/compile/test_compile.py +++ b/tests/functional/compile/test_compile.py @@ -49,9 +49,8 @@ def test_default(self, project): assert get_lines("first_model") == ["select 1 as fun"] assert any("_test_compile as schema" in line for line in get_lines("second_model")) - @pytest.mark.skip("Investigate flaky test #7179") def test_no_introspect(self, project): - with pytest.raises(DbtRuntimeError): + with pytest.raises(DbtRuntimeError, match="connection never acquired for thread"): run_dbt(["compile", "--no-introspect"])