diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2016-04-14 13:43:24 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2016-04-14 13:43:24 -0700 |
commit | 18d8e80f52345a13236ae1da99b5866e7643f85b (patch) | |
tree | 654b3bdfc0dec4b9804db002c50e6e2cf4a56210 | |
parent | a47ab85283bea14bcc464526701bafaf1b8312e2 (diff) | |
download | qtlocation-mapboxgl-18d8e80f52345a13236ae1da99b5866e7643f85b.tar.gz |
[core] Demote "Unable to make space for entry" message from Warning to Debug (#4708)
-rw-r--r-- | platform/default/mbgl/storage/offline_database.cpp | 2 | ||||
-rw-r--r-- | 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 44d0837321..6476834c1b 100644 --- a/platform/default/mbgl/storage/offline_database.cpp +++ b/platform/default/mbgl/storage/offline_database.cpp @@ -158,7 +158,7 @@ std::pair<bool, uint64_t> 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 a9081d2b3f..e211aba2d7 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<FixtureLogObserver>()); 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<FixtureLogObserver*>(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) { |