def test_asyncresult_expiry(self):
        res = self.a_sleep(5)
        res.set_expiry(4)
        t0 = time.time()
        self.assertRaises(rpyc.AsyncResultTimeout, res.wait)
        dt = time.time() - t0
        #print( "timed out after %s" % (dt,) )
        self.assertTrue(dt >= 3.5, str(dt))
        self.assertTrue(dt <= 4.5, str(dt))
dataset/ETHPy150Open tomerfiliba/rpyc/tests/test_async.py/TestAsync.test_asyncresult_expiry/original