def test_worker_processes_exception(self): task = Task(will_fail, (), {}) rsl = self.roundtrip_task(task) assert isinstance(rsl.exception, ExceptionForTest)
def test_hung_worker_uninterruptible(self): task = Task(will_busyhang_uninterruptible, (), {}) self.send_task(task) time.sleep(1.0) self.test_core.send_message(self.ann_socket, Message.SHUTDOWN) self.test_worker.join()
def test_worker_processes_task(self): r = random_int() task = Task(identity, (r, ), {}) rsl = self.roundtrip_task(task) assert rsl.result == r