@@ -459,39 +459,6 @@ TEST(DefaultCacheTest, ExpiredMemTest) {
459459 ASSERT_TRUE (cache.Clear ());
460460}
461461
462- TEST (DefaultCacheTest, BadPathMutable) {
463- olp::cache::CacheSettings settings;
464- settings.disk_path_mutable = std::string (" /////this/is/a/bad/mutable/path" );
465- olp::cache::DefaultCache cache (settings);
466- ASSERT_EQ (olp::cache::DefaultCache::OpenDiskPathFailure, cache.Open ());
467-
468- // Verify that in-memory still works after bad path was set for memcache
469- std::string key1DataString{" this is key1's data" };
470- cache.Put (" key1" , key1DataString, [=]() { return key1DataString; },
471- (std::numeric_limits<time_t >::max)());
472- auto key1DataRead =
473- cache.Get (" key1" , [](const std::string& data) { return data; });
474- ASSERT_FALSE (key1DataRead.empty ());
475- ASSERT_EQ (key1DataString, boost::any_cast<std::string>(key1DataRead));
476- }
477-
478- TEST (DefaultCacheTest, BadPathProtected) {
479- olp::cache::CacheSettings settings;
480- settings.disk_path_protected =
481- std::string (" /////this/is/a/bad/protected/path" );
482- olp::cache::DefaultCache cache (settings);
483- ASSERT_EQ (olp::cache::DefaultCache::OpenDiskPathFailure, cache.Open ());
484-
485- // Verify that in-memory still works after bad path was set for memcache
486- std::string key1_data_string{" this is key1's data" };
487- cache.Put (" key1" , key1_data_string, [=]() { return key1_data_string; },
488- std::numeric_limits<time_t >::max ());
489- auto key1_data_read =
490- cache.Get (" key1" , [](const std::string& data) { return data; });
491- ASSERT_FALSE (key1_data_read.empty ());
492- ASSERT_EQ (key1_data_string, boost::any_cast<std::string>(key1_data_read));
493- }
494-
495462TEST (DefaultCacheTest, AlreadyInUsePath) {
496463 olp::cache::CacheSettings settings;
497464 settings.disk_path_mutable = olp::utils::Dir::TempDirectory () + " /unittest" ;
0 commit comments