summaryrefslogtreecommitdiff
path: root/test/storage/offline_database.test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/storage/offline_database.test.cpp')
-rw-r--r--test/storage/offline_database.test.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/storage/offline_database.test.cpp b/test/storage/offline_database.test.cpp
index 9d798d0a62..e9164e7c66 100644
--- a/test/storage/offline_database.test.cpp
+++ b/test/storage/offline_database.test.cpp
@@ -701,7 +701,8 @@ TEST(OfflineDatabase, TEST_REQUIRES_WRITE(DeleteRegion)) {
db.putRegionResources(region2->getID(), generateResources("mapbox://tile_2", "mapbox://style_2"), status);
const size_t sizeWithTwoRegions = util::read_file(filename).size();
- db.deleteRegion(std::move(*region1), false /*pack*/);
+ db.runPackDatabaseAutomatically(false);
+ db.deleteRegion(std::move(*region1));
ASSERT_EQ(1u, db.listRegions().value().size());
// Region is removed but the size of the database is the same.
@@ -711,7 +712,7 @@ TEST(OfflineDatabase, TEST_REQUIRES_WRITE(DeleteRegion)) {
// The size of the database has shrunk after pack().
const size_t sizeWithOneRegion = util::read_file(filename).size();
EXPECT_LT(sizeWithOneRegion, sizeWithTwoRegions);
-
+ db.runPackDatabaseAutomatically(true);
db.deleteRegion(std::move(*region2));
// The size of the database has shrunk right away.
const size_t sizeWithoutRegions = util::read_file(filename).size();