From 2c783d7905af60a99a40e2e6edac1400b5279679 Mon Sep 17 00:00:00 2001 From: Lidi Zheng Date: Tue, 10 Mar 2020 13:41:49 -0700 Subject: [PATCH] Fix the test_time_remaining test --- src/python/grpcio_tests/tests_aio/unit/call_test.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/python/grpcio_tests/tests_aio/unit/call_test.py b/src/python/grpcio_tests/tests_aio/unit/call_test.py index 74bbc04be2f..f845e078684 100644 --- a/src/python/grpcio_tests/tests_aio/unit/call_test.py +++ b/src/python/grpcio_tests/tests_aio/unit/call_test.py @@ -457,16 +457,16 @@ class TestUnaryStreamCall(_MulticallableTestMixin, AioTestBase): # Should be around the same as the timeout remained_time = call.time_remaining() - self.assertGreater(remained_time, test_constants.SHORT_TIMEOUT * 3 // 2) - self.assertLess(remained_time, test_constants.SHORT_TIMEOUT * 2) + self.assertGreater(remained_time, test_constants.SHORT_TIMEOUT * 3 / 2) + self.assertLess(remained_time, test_constants.SHORT_TIMEOUT * 5 / 2) response = await call.read() self.assertEqual(_RESPONSE_PAYLOAD_SIZE, len(response.payload.body)) # Should be around the timeout minus a unit of wait time remained_time = call.time_remaining() - self.assertGreater(remained_time, test_constants.SHORT_TIMEOUT // 2) - self.assertLess(remained_time, test_constants.SHORT_TIMEOUT * 3 // 2) + self.assertGreater(remained_time, test_constants.SHORT_TIMEOUT / 2) + self.assertLess(remained_time, test_constants.SHORT_TIMEOUT * 3 / 2) self.assertEqual(grpc.StatusCode.OK, await call.code())