Skip to content

Commit 076aa46

Browse files
set up dask client test fix and add epic to nightly builds (#502)
Category: bugfix JIRA issue: hotfix When we run pytest --runslow, there are tests that run dask and set up a client which persists in the next tests. We were making an assumption that there is no dask client in test_set_up_dask_client_default. This PR shuts down a client if one already exists. Add full scale testing epic to nightly builds. Testing Ran pytest --runslow.
1 parent ba0092e commit 076aa46

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tests/unit/test_interface.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,16 @@ def test_validate_source_compatibility_wrong_directory(tmp_path: Path) -> None:
104104

105105

106106
def test_set_up_dask_client_default() -> None:
107-
108-
# There should be no dask client yet
109-
with pytest.raises(ValueError):
107+
# Shut down a client if it exists
108+
try:
110109
client = get_client()
110+
client.shutdown()
111+
except ValueError:
112+
pass
113+
finally:
114+
# There should be no dask client at this point
115+
with pytest.raises(ValueError):
116+
client = get_client()
111117

112118
set_up_dask_client()
113119
client = get_client()

0 commit comments

Comments
 (0)