diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-06-09 03:04:38 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2015-06-09 03:15:10 +0900 |
| commit | b0f440e631efe18099ced96b604447b5fdce28d8 (patch) | |
| tree | d4a705616a58c314eab568772d5a3c4cc53bd69b /test/ServerStatManTest.cc | |
| parent | 99cd73c0926f0c07d27777fde2f15816e8040030 (diff) | |
Rewrite Time with chrono
Diffstat (limited to 'test/ServerStatManTest.cc')
| -rw-r--r-- | test/ServerStatManTest.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/ServerStatManTest.cc b/test/ServerStatManTest.cc index 8b016c85..e87805e4 100644 --- a/test/ServerStatManTest.cc +++ b/test/ServerStatManTest.cc @@ -132,7 +132,7 @@ void ServerStatManTest::testLoad() CPPUNIT_ASSERT_EQUAL(102, localhost_http->getMultiConnectionAvgSpeed()); CPPUNIT_ASSERT_EQUAL(6, localhost_http->getCounter()); CPPUNIT_ASSERT_EQUAL(static_cast<time_t>(1210000000), - localhost_http->getLastUpdated().getTime()); + localhost_http->getLastUpdated().getTimeFromEpoch()); CPPUNIT_ASSERT_EQUAL(ServerStat::OK, localhost_http->getStatus()); std::shared_ptr<ServerStat> mirror = ssm.find("mirror", "http"); @@ -159,7 +159,7 @@ void ServerStatManTest::testRemoveStaleServerStat() CPPUNIT_ASSERT(ssm.add(localhost_ftp)); CPPUNIT_ASSERT(ssm.add(mirror)); - ssm.removeStaleServerStat(24*60*60); + ssm.removeStaleServerStat(std::chrono::hours(24)); CPPUNIT_ASSERT(ssm.find("localhost", "http")); CPPUNIT_ASSERT(!ssm.find("localhost", "ftp")); |
