Show More
@@ -20,6 +20,7 b' import sys' | |||
|
20 | 20 | import time |
|
21 | 21 | |
|
22 | 22 | import zmq |
|
23 | from nose import SkipTest | |
|
23 | 24 | |
|
24 | 25 | from IPython import parallel as pmod |
|
25 | 26 | from IPython.parallel import error |
@@ -39,6 +40,7 b' class TestLoadBalancedView(ClusterTestCase):' | |||
|
39 | 40 | |
|
40 | 41 | def test_z_crash_task(self): |
|
41 | 42 | """test graceful handling of engine death (balanced)""" |
|
43 | raise SkipTest("crash tests disabled, due to undesirable crash reports") | |
|
42 | 44 | # self.add_engines(1) |
|
43 | 45 | ar = self.view.apply_async(crash) |
|
44 | 46 | self.assertRaisesRemote(error.EngineError, ar.get, 10) |
@@ -60,6 +62,7 b' class TestLoadBalancedView(ClusterTestCase):' | |||
|
60 | 62 | view = self.view |
|
61 | 63 | ar = self.client[:].apply_async(time.sleep, .5) |
|
62 | 64 | ar = self.client[:].apply_async(time.sleep, .5) |
|
65 | time.sleep(0.2) | |
|
63 | 66 | ar2 = view.apply_async(lambda : 2) |
|
64 | 67 | ar3 = view.apply_async(lambda : 3) |
|
65 | 68 | view.abort(ar2) |
@@ -22,6 +22,7 b' from tempfile import mktemp' | |||
|
22 | 22 | from StringIO import StringIO |
|
23 | 23 | |
|
24 | 24 | import zmq |
|
25 | from nose import SkipTest | |
|
25 | 26 | |
|
26 | 27 | from IPython import parallel as pmod |
|
27 | 28 | from IPython.parallel import error |
@@ -40,6 +41,7 b' class TestView(ClusterTestCase):' | |||
|
40 | 41 | |
|
41 | 42 | def test_z_crash_mux(self): |
|
42 | 43 | """test graceful handling of engine death (direct)""" |
|
44 | raise SkipTest("crash tests disabled, due to undesirable crash reports") | |
|
43 | 45 | # self.add_engines(1) |
|
44 | 46 | eid = self.client.ids[-1] |
|
45 | 47 | ar = self.client[eid].apply_async(crash) |
@@ -185,8 +187,8 b' class TestView(ClusterTestCase):' | |||
|
185 | 187 | |
|
186 | 188 | ar = v.push(ns, block=False, track=True) |
|
187 | 189 | self.assertTrue(isinstance(ar._tracker, zmq.MessageTracker)) |
|
188 | self.assertEquals(ar.sent, ar._tracker.done) | |
|
189 | 190 | ar._tracker.wait() |
|
191 | self.assertEquals(ar.sent, ar._tracker.done) | |
|
190 | 192 | self.assertTrue(ar.sent) |
|
191 | 193 | ar.get() |
|
192 | 194 | |
@@ -271,7 +273,7 b' class TestView(ClusterTestCase):' | |||
|
271 | 273 | |
|
272 | 274 | def test_abort(self): |
|
273 | 275 | view = self.client[-1] |
|
274 |
ar = view.execute('import time; time.sleep( |
|
|
276 | ar = view.execute('import time; time.sleep(1)', block=False) | |
|
275 | 277 | ar2 = view.apply_async(lambda : 2) |
|
276 | 278 | ar3 = view.apply_async(lambda : 3) |
|
277 | 279 | view.abort(ar2) |
@@ -316,7 +318,9 b' class TestView(ClusterTestCase):' | |||
|
316 | 318 | sio = StringIO() |
|
317 | 319 | savestdout = sys.stdout |
|
318 | 320 | sys.stdout = sio |
|
319 | ip.magic_px('print a') | |
|
321 | # just 'print a' worst ~99% of the time, but this ensures that | |
|
322 | # the stdout message has arrived when the result is finished: | |
|
323 | ip.magic_px('import sys,time;print a; sys.stdout.flush();time.sleep(0.2)') | |
|
320 | 324 | sys.stdout = savestdout |
|
321 | 325 | buf = sio.getvalue() |
|
322 | 326 | self.assertTrue('[stdout:' in buf, buf) |
General Comments 0
You need to be logged in to leave comments.
Login now