summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/matching/sessionmanager_test.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2019-12-06 20:17:56 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2019-12-09 20:43:38 +0000
commit9156592055b871be41b1f634ee37842854dc73a4 (patch)
tree9fe512730a78b950ed07ee7f84a330821a109062 /searchcore/src/tests/proton/matching/sessionmanager_test.cpp
parent3a8c63f34d8554573b42b0c3749e44ad4f43fb0e (diff)
Use std::chrono.
Diffstat (limited to 'searchcore/src/tests/proton/matching/sessionmanager_test.cpp')
-rw-r--r--searchcore/src/tests/proton/matching/sessionmanager_test.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/searchcore/src/tests/proton/matching/sessionmanager_test.cpp b/searchcore/src/tests/proton/matching/sessionmanager_test.cpp
index 5998b165b51..f3edf2bf747 100644
--- a/searchcore/src/tests/proton/matching/sessionmanager_test.cpp
+++ b/searchcore/src/tests/proton/matching/sessionmanager_test.cpp
@@ -18,7 +18,7 @@ using vespalib::string;
using namespace proton;
using namespace proton::matching;
using vespalib::StateExplorer;
-using fastos::SteadyTimeStamp;
+using vespalib::steady_time;
namespace {
@@ -35,8 +35,8 @@ void checkStats(SessionManager::Stats stats, uint32_t numInsert,
TEST("require that SessionManager handles SearchSessions.") {
string session_id("foo");
- SteadyTimeStamp start(100);
- SteadyTimeStamp doom(1000);
+ steady_time start(100ns);
+ steady_time doom(1000ns);
MatchToolsFactory::UP mtf;
SearchSession::OwnershipBundle owned_objects;
auto session = std::make_shared<SearchSession>(session_id, start, doom, std::move(mtf), std::move(owned_objects));
@@ -50,9 +50,9 @@ TEST("require that SessionManager handles SearchSessions.") {
TEST_DO(checkStats(session_manager.getSearchStats(), 0, 1, 0, 1, 0));
session_manager.insert(std::move(session));
TEST_DO(checkStats(session_manager.getSearchStats(), 1, 0, 0, 1, 0));
- session_manager.pruneTimedOutSessions(SteadyTimeStamp(500));
+ session_manager.pruneTimedOutSessions(steady_time(500ns));
TEST_DO(checkStats(session_manager.getSearchStats(), 0, 0, 0, 1, 0));
- session_manager.pruneTimedOutSessions(SteadyTimeStamp(2000));
+ session_manager.pruneTimedOutSessions(steady_time(2000ns));
TEST_DO(checkStats(session_manager.getSearchStats(), 0, 0, 0, 0, 1));
session = session_manager.pickSearch(session_id);
@@ -60,8 +60,8 @@ TEST("require that SessionManager handles SearchSessions.") {
}
TEST("require that SessionManager can be explored") {
- SteadyTimeStamp start(100);
- SteadyTimeStamp doom(1000);
+ steady_time start(100ns);
+ steady_time doom(1000ns);
SessionManager session_manager(10);
session_manager.insert(std::make_shared<SearchSession>("foo", start, doom,
MatchToolsFactory::UP(), SearchSession::OwnershipBundle()));