From 4a76b4712edac9a6a2cc397696f6b5b847c37276 Mon Sep 17 00:00:00 2001 From: Sander Roet Date: Tue, 10 Jul 2018 10:20:13 +0200 Subject: [PATCH 1/2] try setting a timeout --- contact_map/tests/test_dask_runner.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/contact_map/tests/test_dask_runner.py b/contact_map/tests/test_dask_runner.py index d72cb18..49a98d3 100644 --- a/contact_map/tests/test_dask_runner.py +++ b/contact_map/tests/test_dask_runner.py @@ -11,8 +11,7 @@ def test_dask_integration(self): # this is an integration test to check that dask works dask = pytest.importorskip('dask') # pylint: disable=W0612 distributed = pytest.importorskip('dask.distributed') - - client = distributed.Client() + client = distributed.Client(timeout=120) filename = find_testfile("trajectory.pdb") dask_freq = DaskContactFrequency(client, filename, cutoff=0.075, From d930eef4a4bebac9b6f55543a3016ee66519637f Mon Sep 17 00:00:00 2001 From: Sander Roet Date: Tue, 10 Jul 2018 10:34:09 +0200 Subject: [PATCH 2/2] fix by only spin up 4 workers instead of 31 --- contact_map/tests/test_dask_runner.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contact_map/tests/test_dask_runner.py b/contact_map/tests/test_dask_runner.py index 49a98d3..f938a66 100644 --- a/contact_map/tests/test_dask_runner.py +++ b/contact_map/tests/test_dask_runner.py @@ -11,7 +11,10 @@ def test_dask_integration(self): # this is an integration test to check that dask works dask = pytest.importorskip('dask') # pylint: disable=W0612 distributed = pytest.importorskip('dask.distributed') - client = distributed.Client(timeout=120) + # Explicitly set only 4 workers on Travis instead of 31 + # Fix copied from https://github.com/spencerahill/aospy/pull/220/files + cluster = distributed.LocalCluster(n_workers=4) + client = distributed.Client(cluster) filename = find_testfile("trajectory.pdb") dask_freq = DaskContactFrequency(client, filename, cutoff=0.075,