Skip to content

Commit e12237c

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 fabc791 commit e12237c

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ Updating the shared repo will take affect on the next pipeline invocation.
1818
The "_" denotes that all modules will be imported from the shared library.
1919
*/
2020
@Library("vivarium_build_utils") _
21-
reusable_pipeline(scheduled_branches: ["main", "release-candidate/v.orange.rebased"], upstream_repos: ["layered_config_tree"])
21+
reusable_pipeline(scheduled_branches: ["main", "epic/full_scale_testing", "release-candidate/v.orange.rebased"], upstream_repos: ["layered_config_tree"])

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)