diff options
author | yangg <yangg@google.com> | 2014-12-11 15:57:37 -0800 |
---|---|---|
committer | Nicolas Noble <nnoble@google.com> | 2014-12-12 16:08:10 -0800 |
commit | 87da1b937dc478a1562c1e0ed6c80256e7ee2c53 (patch) | |
tree | 5d76f8841133d4ae5c9a10e95b9bcd6569ed443e /test/cpp/util/time_test.cc | |
parent | 33a2168453a65e032f9582b3166e369d3f826c67 (diff) |
Make the default deadline gpr_inf_future to avoid mismatch between
gpr_inf_future and time_point::max(). The redundant AbsoluteDeadline prefix is removed from the utility function names.
Now the ClientContext holds a gpr_timespec instead of a time_point.
A test will be added in the server side deadline support cl.
Change on 2014/12/11 by yangg <yangg@google.com>
-------------
Created by MOE: http://code.google.com/p/moe-java
MOE_MIGRATED_REVID=81920769
Diffstat (limited to 'test/cpp/util/time_test.cc')
-rw-r--r-- | test/cpp/util/time_test.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/cpp/util/time_test.cc b/test/cpp/util/time_test.cc index 4c633f34f5..97499fed28 100644 --- a/test/cpp/util/time_test.cc +++ b/test/cpp/util/time_test.cc @@ -52,14 +52,12 @@ TEST_F(TimeTest, AbsolutePointTest) { long us = 10000000L; gpr_timespec ts = gpr_time_from_micros(us); system_clock::time_point tp{microseconds(us)}; - system_clock::time_point tp_converted = - AbsoluteDeadlineTimespec2Timepoint(ts); + system_clock::time_point tp_converted = Timespec2Timepoint(ts); gpr_timespec ts_converted; - AbsoluteDeadlineTimepoint2Timespec(tp_converted, &ts_converted); + Timepoint2Timespec(tp_converted, &ts_converted); EXPECT_TRUE(ts.tv_sec == ts_converted.tv_sec); EXPECT_TRUE(ts.tv_nsec == ts_converted.tv_nsec); - system_clock::time_point tp_converted_2 = - AbsoluteDeadlineTimespec2Timepoint(ts_converted); + system_clock::time_point tp_converted_2 = Timespec2Timepoint(ts_converted); EXPECT_TRUE(tp == tp_converted); EXPECT_TRUE(tp == tp_converted_2); } |