diff --git a/IPython/parallel/tests/test_lbview.py b/IPython/parallel/tests/test_lbview.py index dd8f57a..4bdaf91 100644 --- a/IPython/parallel/tests/test_lbview.py +++ b/IPython/parallel/tests/test_lbview.py @@ -156,16 +156,24 @@ class TestLoadBalancedView(ClusterTestCase): def test_retries(self): view = self.view - view.timeout = 1 # prevent hang if this doesn't behave def fail(): assert False for r in range(len(self.client)-1): with view.temp_flags(retries=r): self.assertRaisesRemote(AssertionError, view.apply_sync, fail) - with view.temp_flags(retries=len(self.client), timeout=0.25): + with view.temp_flags(retries=len(self.client), timeout=0.1): self.assertRaisesRemote(error.TaskTimeout, view.apply_sync, fail) + def test_short_timeout(self): + view = self.view + def fail(): + import time + time.sleep(0.25) + assert False + with view.temp_flags(retries=1, timeout=0.01): + self.assertRaisesRemote(AssertionError, view.apply_sync, fail) + def test_invalid_dependency(self): view = self.view with view.temp_flags(after='12345'):