summaryrefslogtreecommitdiff
path: root/src/mongo/db/logical_time_test.cpp
diff options
context:
space:
mode:
authorJack Mulrow <jack.mulrow@mongodb.com>2017-03-27 15:40:32 -0400
committerJack Mulrow <jack.mulrow@mongodb.com>2017-03-28 18:05:58 -0400
commit399ba02faf7124d4b4c52f8b7e91f5aeb307ee1b (patch)
tree86f1fa09b54bc0f9984081fb3652398ca895a9c2 /src/mongo/db/logical_time_test.cpp
parentea0e436f77b1a1e7977df55d6fd4d70c5aa7b9b8 (diff)
downloadmongo-399ba02faf7124d4b4c52f8b7e91f5aeb307ee1b.tar.gz
SERVER-28438 Add keyId field to logicalTime object
Diffstat (limited to 'src/mongo/db/logical_time_test.cpp')
-rw-r--r--src/mongo/db/logical_time_test.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mongo/db/logical_time_test.cpp b/src/mongo/db/logical_time_test.cpp
index f0f0d7b4477..b55d4fee950 100644
--- a/src/mongo/db/logical_time_test.cpp
+++ b/src/mongo/db/logical_time_test.cpp
@@ -107,15 +107,19 @@ TEST(LogicalTime, toUnsignedArray) {
TEST(SignedLogicalTime, roundtrip) {
Timestamp tX(1);
+
std::array<std::uint8_t, 20> tempKey = {};
TimeProofService::Key key(std::move(tempKey));
TimeProofService tps(std::move(key));
auto time = LogicalTime(tX);
auto proof = tps.getProof(time);
- SignedLogicalTime signedTime(time, proof);
+ long long keyId = 1;
+
+ SignedLogicalTime signedTime(time, proof, keyId);
ASSERT_TRUE(time == signedTime.getTime());
ASSERT_TRUE(proof == signedTime.getProof());
+ ASSERT_TRUE(keyId == signedTime.getKeyId());
}
} // unnamed namespace