diff options
author | Maria van Keulen <maria@mongodb.com> | 2019-04-15 11:52:11 -0400 |
---|---|---|
committer | Maria van Keulen <maria@mongodb.com> | 2019-04-19 14:32:04 -0400 |
commit | 943e0fbfd8bf7223f03189bd8af1d5e423aa387f (patch) | |
tree | 30f14257c01d7c175c19b45e63b3ff252989fc1a /src/mongo/db/repl/replication_coordinator_test_fixture.h | |
parent | e1e95afbd58a7449dd1765cb910b4d136f95fcc4 (diff) | |
download | mongo-943e0fbfd8bf7223f03189bd8af1d5e423aa387f.tar.gz |
SERVER-40659 Add regression tests for wall clock time transmission
Diffstat (limited to 'src/mongo/db/repl/replication_coordinator_test_fixture.h')
-rw-r--r-- | src/mongo/db/repl/replication_coordinator_test_fixture.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/repl/replication_coordinator_test_fixture.h b/src/mongo/db/repl/replication_coordinator_test_fixture.h index ab831e8820a..c7dcbcb8985 100644 --- a/src/mongo/db/repl/replication_coordinator_test_fixture.h +++ b/src/mongo/db/repl/replication_coordinator_test_fixture.h @@ -119,7 +119,7 @@ protected: void replCoordSetMyLastAppliedOpTime(const OpTime& opTime, Date_t wallTime = Date_t::min()) { if (wallTime == Date_t::min()) { - wallTime = wallTime + Seconds(opTime.getSecs()); + wallTime = Date_t() + Seconds(opTime.getSecs()); } getReplCoord()->setMyLastAppliedOpTimeAndWallTime({opTime, wallTime}); } @@ -128,14 +128,14 @@ protected: ReplicationCoordinator::DataConsistency consistency, Date_t wallTime = Date_t::min()) { if (wallTime == Date_t::min()) { - wallTime = wallTime + Seconds(opTime.getSecs()); + wallTime = Date_t() + Seconds(opTime.getSecs()); } getReplCoord()->setMyLastAppliedOpTimeAndWallTimeForward({opTime, wallTime}, consistency); } void replCoordSetMyLastDurableOpTime(const OpTime& opTime, Date_t wallTime = Date_t::min()) { if (wallTime == Date_t::min()) { - wallTime = wallTime + Seconds(opTime.getSecs()); + wallTime = Date_t() + Seconds(opTime.getSecs()); } getReplCoord()->setMyLastDurableOpTimeAndWallTime({opTime, wallTime}); } @@ -143,7 +143,7 @@ protected: void replCoordSetMyLastDurableOpTimeForward(const OpTime& opTime, Date_t wallTime = Date_t::min()) { if (wallTime == Date_t::min()) { - wallTime = wallTime + Seconds(opTime.getSecs()); + wallTime = Date_t() + Seconds(opTime.getSecs()); } getReplCoord()->setMyLastDurableOpTimeAndWallTimeForward({opTime, wallTime}); } @@ -152,7 +152,7 @@ protected: Date_t wallTime = Date_t::min(), bool fromSyncSource = false) { if (wallTime == Date_t::min()) { - wallTime = wallTime + Seconds(opTime.getSecs()); + wallTime = Date_t() + Seconds(opTime.getSecs()); } getReplCoord()->advanceCommitPoint({opTime, wallTime}, fromSyncSource); } |