From 18d8e80f52345a13236ae1da99b5866e7643f85b Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Thu, 14 Apr 2016 13:43:24 -0700 Subject: [PATCH] [core] Demote "Unable to make space for entry" message from Warning to Debug (#4708) --- platform/default/mbgl/storage/offline_database.cpp | 2 +- test/storage/offline_database.cpp | 8 ++------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/platform/default/mbgl/storage/offline_database.cpp b/platform/default/mbgl/storage/offline_database.cpp index 44d083732..6476834c1 100644 --- a/platform/default/mbgl/storage/offline_database.cpp +++ b/platform/default/mbgl/storage/offline_database.cpp @@ -158,7 +158,7 @@ std::pair OfflineDatabase::putInternal(const Resource& resource, } if (evict_ && !evict(size)) { - Log::Warning(Event::Database, "Unable to make space for entry"); + Log::Debug(Event::Database, "Unable to make space for entry"); return { false, 0 }; } diff --git a/test/storage/offline_database.cpp b/test/storage/offline_database.cpp index a9081d2b3..e211aba2d 100644 --- a/test/storage/offline_database.cpp +++ b/test/storage/offline_database.cpp @@ -586,17 +586,13 @@ TEST(OfflineDatabase, PutRegionResourceDoesNotEvict) { TEST(OfflineDatabase, PutFailsWhenEvictionInsuffices) { using namespace mbgl; - Log::setObserver(std::make_unique()); OfflineDatabase db(":memory:", 1024 * 100); Response big; big.data = randomString(1024 * 100); - db.put(Resource::style("http://example.com/big"), big); - EXPECT_FALSE(bool(db.get(Resource::style("http://example.com/big")))); - auto observer = Log::removeObserver(); - auto flo = dynamic_cast(observer.get()); - EXPECT_EQ(1ul, flo->count({ EventSeverity::Warning, Event::Database, -1, "Unable to make space for entry" })); + EXPECT_FALSE(db.put(Resource::style("http://example.com/big"), big).first); + EXPECT_FALSE(bool(db.get(Resource::style("http://example.com/big")))); } TEST(OfflineDatabase, OfflineMapboxTileCount) {