Skip to content

Commit 8aa63dd

Browse files
authored
fix: Sync execution of tracker tests (#182)
1 parent 72f614f commit 8aa63dd

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,5 @@ jobs:
4545
API_ENDPOINT: "api.dev.firebolt.io"
4646
ACCOUNT_NAME: "firebolt"
4747
run: |
48-
pytest -n 6 --timeout_method "signal" -o log_cli=true -o log_cli_level=INFO tests/integration
48+
pytest -n 6 --dist loadgroup --timeout_method "signal" -o log_cli=true -o log_cli_level=INFO tests/integration
4949

tests/integration/utils/test_usage_tracker.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
]
1818

1919

20-
@fixture(scope="module", autouse=True)
20+
@mark.xdist_group(name="usage_tracker")
21+
@fixture(scope="module")
2122
def create_cli_mock():
2223
# Cleanup before starting
2324
rmtree(TEST_FOLDER, ignore_errors=True)
@@ -32,6 +33,7 @@ def create_cli_mock():
3233
rmtree(TEST_FOLDER)
3334

3435

36+
@mark.xdist_group(name="usage_tracker")
3537
@fixture(scope="module")
3638
def test_model():
3739
with open(TEST_SCRIPT_MODEL) as f:
@@ -45,6 +47,7 @@ def create_test_file(code: str, function_name: str, file_path: str):
4547
f.write(code)
4648

4749

50+
@mark.xdist_group(name="usage_tracker")
4851
@mark.parametrize(
4952
"function,path,expected",
5053
[
@@ -66,7 +69,7 @@ def create_test_file(code: str, function_name: str, file_path: str):
6669
("open", "dbt/adapters/firebolt/connections.py", "DBT/1.0.3"),
6770
],
6871
)
69-
def test_usage_detection(function, path, expected, test_model):
72+
def test_usage_detection(function, path, expected, test_model, create_cli_mock):
7073
test_path = TEST_FOLDER + path
7174
create_test_file(test_model, function, test_path)
7275
result = run(

0 commit comments

Comments
 (0)