summaryrefslogtreecommitdiff
path: root/src/mongo/db/op_observer_impl_test.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2020-02-03 09:11:19 -0500
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-02-14 10:54:32 +0000
commitb6ef7212c4f1c263e9d997b606c9127601e023e3 (patch)
tree0516c4d3e89e5b4ee7788379804ba46b7340ac43 /src/mongo/db/op_observer_impl_test.cpp
parenta7a4c477283d6cdddb5d16de6b976b71a7afaffe (diff)
downloadmongo-b6ef7212c4f1c263e9d997b606c9127601e023e3.tar.gz
SERVER-45120 Move 'localSetTime' out of the RWConcernDefault IDL
Diffstat (limited to 'src/mongo/db/op_observer_impl_test.cpp')
-rw-r--r--src/mongo/db/op_observer_impl_test.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mongo/db/op_observer_impl_test.cpp b/src/mongo/db/op_observer_impl_test.cpp
index 06b18144353..79270c9b5cd 100644
--- a/src/mongo/db/op_observer_impl_test.cpp
+++ b/src/mongo/db/op_observer_impl_test.cpp
@@ -2306,25 +2306,25 @@ TEST_F(OpObserverTest, OnRollbackInvalidatesDefaultRWConcernCache) {
// Put initial defaults in the cache.
{
RWConcernDefault origDefaults;
- origDefaults.setEpoch(Timestamp(10, 20));
- origDefaults.setSetTime(Date_t::fromMillisSinceEpoch(1234));
+ origDefaults.setUpdateOpTime(Timestamp(10, 20));
+ origDefaults.setUpdateWallClockTime(Date_t::fromMillisSinceEpoch(1234));
_lookupMock.setLookupCallReturnValue(std::move(origDefaults));
}
auto origCachedDefaults = rwcDefaults.getDefault(opCtx.get());
- ASSERT_EQ(Timestamp(10, 20), *origCachedDefaults.getEpoch());
- ASSERT_EQ(Date_t::fromMillisSinceEpoch(1234), *origCachedDefaults.getSetTime());
+ ASSERT_EQ(Timestamp(10, 20), *origCachedDefaults.getUpdateOpTime());
+ ASSERT_EQ(Date_t::fromMillisSinceEpoch(1234), *origCachedDefaults.getUpdateWallClockTime());
// Change the mock's defaults, but don't invalidate the cache yet. The cache should still return
// the original defaults.
{
RWConcernDefault newDefaults;
- newDefaults.setEpoch(Timestamp(50, 20));
- newDefaults.setSetTime(Date_t::fromMillisSinceEpoch(5678));
+ newDefaults.setUpdateOpTime(Timestamp(50, 20));
+ newDefaults.setUpdateWallClockTime(Date_t::fromMillisSinceEpoch(5678));
_lookupMock.setLookupCallReturnValue(std::move(newDefaults));
auto cachedDefaults = rwcDefaults.getDefault(opCtx.get());
- ASSERT_EQ(Timestamp(10, 20), *cachedDefaults.getEpoch());
- ASSERT_EQ(Date_t::fromMillisSinceEpoch(1234), *cachedDefaults.getSetTime());
+ ASSERT_EQ(Timestamp(10, 20), *cachedDefaults.getUpdateOpTime());
+ ASSERT_EQ(Date_t::fromMillisSinceEpoch(1234), *cachedDefaults.getUpdateWallClockTime());
}
// Rollback to a timestamp should invalidate the cache and getting the defaults should now
@@ -2335,8 +2335,8 @@ TEST_F(OpObserverTest, OnRollbackInvalidatesDefaultRWConcernCache) {
opObserver.onReplicationRollback(opCtx.get(), rbInfo);
}
auto newCachedDefaults = rwcDefaults.getDefault(opCtx.get());
- ASSERT_EQ(Timestamp(50, 20), *newCachedDefaults.getEpoch());
- ASSERT_EQ(Date_t::fromMillisSinceEpoch(5678), *newCachedDefaults.getSetTime());
+ ASSERT_EQ(Timestamp(50, 20), *newCachedDefaults.getUpdateOpTime());
+ ASSERT_EQ(Date_t::fromMillisSinceEpoch(5678), *newCachedDefaults.getUpdateWallClockTime());
}
} // namespace