

@_redirect_stderr
def test_enqueue_wait_unhandledfail(self):
    self.store.write(self.env, IsA(float)).AndReturn('1234')
    self.relay._attempt(self.env, 0).AndRaise(Exception('unhandled error'))
    self.store.increment_attempts('1234')
    self.store.set_timestamp('1234', IsA(float))
    self.mox.ReplayAll()

    def backoff(envelope, attempts):
        return 0
    queue = Queue(self.store, self.relay, backoff=backoff, relay_pool=5)
    queue.enqueue(self.env)
    queue.relay_pool.join()

dataset/ETHPy150Open slimta/python-slimta/test/test_slimta_queue.py TestQueue.test_enqueue_wait_unhandledfail/original