@timeout_decorator.timeout(seconds=300)
def test_actor_exception(self):
    master = Master(port=1236)
    th = threading.Thread(target=master.run)
    th.start()
    time.sleep(1)
    worker1 = Worker('localhost:1236', 1)
    self.assertEqual(1, master.cpu_num)
    parl.connect('localhost:1236')
    actor = Actor()
    try:
        actor.will_raise_exception_func()
    except:
        pass
    actor2 = Actor()
    time.sleep(30)
    self.assertEqual(actor2.add_one(1), 2)
    self.assertEqual(0, master.cpu_num)
    del actor
    del actor2
    worker1.exit()
    master.exit()
@timeout_decorator.timeout(seconds=300)
def test_actor_exception(self):
    master = Master(port=1236)
    th = threading.Thread(target=master.run)
    th.start()
    time.sleep(1)
    worker1 = Worker('localhost:1236', 1)
    self.assertEqual(1, master.cpu_num)
    parl.connect('localhost:1236')
    actor = Actor()
    try:
        actor.will_raise_exception_func()
    except:
        pass
    actor2 = Actor()
    time.sleep(30)
    self.assertEqual(actor2.add_one(1), 2)
    self.assertEqual(0, master.cpu_num)
    del actor
    del actor2
    worker1.exit()
    master.exit()