Page MenuHomePhabricator

D3806.diff
No OneTemporary

D3806.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
@@ -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,10 @@
EXPECT_EQ(item.getPayload(), foundItem->getPayload());
EXPECT_EQ(item.getBlobHashes(), foundItem->getBlobHashes());
EXPECT_EQ(item.getExpire(), foundItem->getExpire());
+ EXPECT_EQ(
+ foundItem->getCreatedAt() >= currentTimestamp &&
+ foundItem->getCreatedAt() <= static_cast<size_t>(std::time(0),
+ true);
database::DatabaseManager::getInstance().removeMessageItem(
item.getMessageID());
}

File Metadata

Mime Type
text/plain
Expires
Sun, Dec 1, 3:24 PM (21 h, 22 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2605338
Default Alt Text
D3806.diff (1 KB)

Event Timeline