Page MenuHomePhabricator

D3806.id11773.diff
No OneTemporary

D3806.id11773.diff

diff --git a/services/tunnelbroker/test/DatabaseManagerTest.cpp b/services/tunnelbroker/test/DatabaseManagerTest.cpp
--- a/services/tunnelbroker/test/DatabaseManagerTest.cpp
+++ b/services/tunnelbroker/test/DatabaseManagerTest.cpp
@@ -21,7 +21,7 @@
virtual void TearDown() {
Aws::ShutdownAPI({});
}
-};
+}
TEST_F(DatabaseManagerTest, PutAndFoundMessageItemsStaticDataIsSame) {
const database::MessageItem item(
@@ -38,6 +38,7 @@
"6d37StvXBzfJoZVU79UeOF2bFvb3DNoArEOe",
"7s6ZUSDoFfZe3eJWQ15ngYhgMw1TsfbECnMVQTYvY6OyqWPBQi5wiftFcluoxor8",
static_cast<uint64_t>(std::time(0)) + 600);
+ const size_t currentTimestamp = static_cast<size_t>(std::time(0));
EXPECT_EQ(
database::DatabaseManager::getInstance().isTableAvailable(
item.getTableName()),
@@ -52,6 +53,7 @@
EXPECT_EQ(item.getPayload(), foundItem->getPayload());
EXPECT_EQ(item.getBlobHashes(), foundItem->getBlobHashes());
EXPECT_EQ(item.getExpire(), foundItem->getExpire());
+ EXPECT_EQ(foundItem->getCreatedAt() >= currentTimestamp, true);
database::DatabaseManager::getInstance().removeMessageItem(
item.getMessageID());
}

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 28, 10:32 PM (21 h, 40 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2595039
Default Alt Text
D3806.id11773.diff (1 KB)

Event Timeline