Skip to content

Commit 85fa2da

Browse files
authored
Update MutableCacheExpired test. (#1031)
Test error fixed some time ago by commit 0332b0d. This is small update to make the test fail instead of throwing boost exception. Resolves: OLPEDGE-2102 Signed-off-by: Kostiantyn Zvieriev <ext-kostiantyn.zvieriev@here.com>
1 parent b1352e4 commit 85fa2da

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

olp-cpp-sdk-core/tests/cache/DefaultCacheImplTest.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,6 @@ TEST_F(DefaultCacheImplTest, LruCacheRemove) {
335335
}
336336
}
337337
TEST_F(DefaultCacheImplTest, MutableCacheExpired) {
338-
SCOPED_TRACE("Expiry mutable cache");
339338
const std::string key1{"somekey1"};
340339
const std::string key2{"somekey2"};
341340
const std::string data_string{"this is key's data"};
@@ -363,8 +362,8 @@ TEST_F(DefaultCacheImplTest, MutableCacheExpired) {
363362
const auto value2 =
364363
cache2.Get(key2, [](const std::string& value) { return value; });
365364

366-
EXPECT_FALSE(value.get() == nullptr);
367-
EXPECT_EQ(value2.type(), typeid(std::string));
365+
ASSERT_NE(value.get(), nullptr);
366+
ASSERT_EQ(value2.type(), typeid(std::string));
368367
auto str = boost::any_cast<std::string>(value2);
369368
EXPECT_EQ(str, data_string);
370369

0 commit comments

Comments
 (0)