diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2015-05-07 16:45:29 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2015-05-12 09:57:33 -0400 |
commit | 9aac625685811873ffbc2d3e8d09531eff1ce10e (patch) | |
tree | ecd8dd9fc9d148b196c6ab2aa5e38e5f9e327c54 /src/mongo/db/repl/scatter_gather_test.cpp | |
parent | 21a16d229bdba571f1118a419898b666c666b869 (diff) | |
download | mongo-9aac625685811873ffbc2d3e8d09531eff1ce10e.tar.gz |
SERVER-13874 Make mongo::Milliseconds et al. aliases for equivalent stdx::chrono types.
Also introduces operators for adding stdx::chrono::duration to Date_t,
subtracting two Date_ts to get Milliseconds, and remove the use of
reinterpret_cast from the implementation of BSON Timestamp type.
Diffstat (limited to 'src/mongo/db/repl/scatter_gather_test.cpp')
-rw-r--r-- | src/mongo/db/repl/scatter_gather_test.cpp | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/src/mongo/db/repl/scatter_gather_test.cpp b/src/mongo/db/repl/scatter_gather_test.cpp index a98c5a1f51f..1fc6765e58e 100644 --- a/src/mongo/db/repl/scatter_gather_test.cpp +++ b/src/mongo/db/repl/scatter_gather_test.cpp @@ -186,29 +186,29 @@ namespace { net->enterNetwork(); NetworkInterfaceMock::NetworkOperationIterator noi = net->getNextReadyRequest(); net->scheduleResponse(noi, - net->now()+2000, + net->now() + Seconds(2), ResponseStatus(RemoteCommandResponse( BSON("ok" << 1), - boost::posix_time::milliseconds(10)))); + Milliseconds(10)))); ASSERT_FALSE(ranCompletion); noi = net->getNextReadyRequest(); net->scheduleResponse(noi, - net->now()+2000, + net->now() + Seconds(2), ResponseStatus(RemoteCommandResponse( BSON("ok" << 1), - boost::posix_time::milliseconds(10)))); + Milliseconds(10)))); ASSERT_FALSE(ranCompletion); noi = net->getNextReadyRequest(); net->scheduleResponse(noi, - net->now()+5000, + net->now() + Seconds(5), ResponseStatus(RemoteCommandResponse( BSON("ok" << 1), - boost::posix_time::milliseconds(10)))); + Milliseconds(10)))); ASSERT_FALSE(ranCompletion); - net->runUntil(net->now()+2000); + net->runUntil(net->now() + Seconds(2)); ASSERT_TRUE(ranCompletion); delete sga; @@ -290,32 +290,31 @@ namespace { net->enterNetwork(); NetworkInterfaceMock::NetworkOperationIterator noi = net->getNextReadyRequest(); net->scheduleResponse(noi, - net->now()+2000, + net->now() + Seconds(2), ResponseStatus(RemoteCommandResponse( BSON("ok" << 1), - boost::posix_time::milliseconds(10)))); + Milliseconds(10)))); ASSERT_FALSE(ranCompletion); noi = net->getNextReadyRequest(); net->scheduleResponse(noi, - net->now()+2000, + net->now() + Seconds(2), ResponseStatus(RemoteCommandResponse( BSON("ok" << 1), - boost::posix_time::milliseconds(10)))); + Milliseconds(10)))); ASSERT_FALSE(ranCompletion); noi = net->getNextReadyRequest(); net->scheduleResponse(noi, - net->now()+5000, + net->now() + Seconds(5), ResponseStatus(RemoteCommandResponse( BSON("ok" << 1), - boost::posix_time::milliseconds(10)))); + Milliseconds(10)))); ASSERT_FALSE(ranCompletion); - net->runUntil(net->now()+2000); + net->runUntil(net->now() + Seconds(2)); ASSERT_TRUE(ranCompletion); - net->runReadyNetworkOperations(); // the third resposne should not be processed, so the count should not increment ASSERT_EQUALS(2, sga.getResponseCount()); @@ -400,7 +399,7 @@ namespace { net->now(), ResponseStatus(RemoteCommandResponse( BSON("ok" << 1), - boost::posix_time::milliseconds(10)))); + Milliseconds(10)))); net->runReadyNetworkOperations(); noi = net->getNextReadyRequest(); @@ -412,7 +411,7 @@ namespace { net->now(), ResponseStatus(RemoteCommandResponse( BSON("ok" << 1), - boost::posix_time::milliseconds(10)))); + Milliseconds(10)))); net->runReadyNetworkOperations(); net->exitNetwork(); |