summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/scatter_gather_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/scatter_gather_test.cpp')
-rw-r--r--src/mongo/db/repl/scatter_gather_test.cpp33
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();