summaryrefslogtreecommitdiff
path: root/test/storage/offline_database.test.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [build] Fix undefined behavour sanitizer (#16375)zmiao2020-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [build] Fix integer overflow runtime error for core part Temporarily remove circle ci UBSAN build precondition * [build] Enable all of the ubsans [build] Check runtime error [build] Update UBSAN_OPTION * [build] Add UBSAN blacklist [build] Ignore system libraries [build] Ignore vendor library * [build] Fix implicit conversion runtime error in core * [build] Fix division by zero runtime error * [build] Add unfixed error to ubsan blacklist * [build] Make UBSAN halt on error Revert "Temporary remove build precondition" * [build] Fix division by zero error * [build] Make UBSAN officially work without FIXME prefix * [build] Fix implicit conversion from int64_t to uint64_t * [build] Rename style test json file name * Address review findings
* [core] Add unit tests for ambient cache sizeAlexander Shalamov2020-03-071-8/+52
|
* [test] Fix failing tests on iOSJuha Alanen2020-02-141-4/+4
|
* Add OfflineDatabase.UpdateDatabaseReadOnlyMode unit testMikhail Pozdnyakov2020-02-071-0/+16
|
* Add OfflineDatabase.PutResourceReadOnlyMode unit testMikhail Pozdnyakov2020-02-071-0/+27
|
* [core] Add OfflineDatabase.Pack unit testMikhail Pozdnyakov2019-12-021-0/+30
|
* [core] Introduce OfflineDatabase::runPackDatabaseAutomatically() APIMikhail Pozdnyakov2019-12-021-2/+3
| | | | | - added a unit test - Updated inline comments in default_file_source.hpp
* [core] OfflineDatabase pack APIMikhail Pozdnyakov2019-11-121-11/+37
| | | | | | - introduce `OfflineDatabase::pack()` standing for incremental vacuum - make pack optional at offline region deletion - update `OfflineDatabase.DeleteRegion` test accordingly to the items above
* [core] Enable incremental vacuum for Offline DBMikhail Pozdnyakov2019-10-221-6/+46
| | | | Thus we avoid re-creating the whole database and keeping the backup file as it happens on calling VACUUM.
* [core] Mark offline region resources in batchesMikhail Pozdnyakov2019-08-291-20/+18
|
* [core] Disable flaky OfflineDatabase.MaximumAmbientCacheSize testJason Wray2019-08-071-1/+2
|
* [core] Add storage unit tests for MapboxTileLimitExceededThiago Marcos P. Santos2019-06-191-0/+98
|
* [tests] Add unit tests for cache sizeThiago Marcos P. Santos2019-06-181-0/+134
|
* [core] Add method for setting a maximum size for the ambient cacheThiago Marcos P. Santos2019-06-181-13/+34
| | | | | | | - Removed this parameter from the constructor, now that we have a method to set it. - Add the method and enforce the limits if the ambient cache exceeds the size.
* [core] Clear/Invalidate should also work on non-tile resourcesThiago Marcos P. Santos2019-06-181-29/+59
| | | | | These methods were only affecting tiles, but they should really work on every resource like style, glyphs, etc.
* [core] Rename resetCache to resetDatabaseThiago Marcos P. Santos2019-06-181-3/+3
| | | | | Avoid confusion about what is being reset. In this case, the whole database and not only the ambient cache.
* [tests] Follow-up of previews PR, these tests need write permissionThiago Marcos P. Santos2019-06-181-2/+2
|
* [tests] Improve unit test for deleting offline region and concurrent useThiago Marcos P. Santos2019-06-131-12/+39
| | | | | | Test if the physical size of the database will also reduce. Clear the cache while adding resource on another connection.
* [tests] Add unit test for clearing the ambient cacheThiago Marcos P. Santos2019-06-131-11/+39
|
* [tests] Add unit tests for offline data invalidationThiago Marcos P. Santos2019-05-211-0/+67
|
* [test] Add unit test for clearCache APISudarsana Babu Nagineni2019-04-291-0/+14
|
* [core] clang-tidy fixesKonstantin Käfer2019-04-051-1/+1
|
* [core] expose an option to change the db file path in runtimeŁukasz Paczos2019-03-131-0/+8
|
* [core] Support for excluding ideographic glyphs from offline downloads.Chris Loer2018-12-211-14/+17
|
* [build] rework platform/default directory and add -files.txt for vendored libsKonstantin Käfer2018-12-141-1/+1
|
* Enforce Offline tile limit when merging sideloaded databasesAsheem Mamoowala2018-08-281-0/+31
|
* Require minimum side-loaded database user_version=6Asheem Mamoowala2018-08-281-1/+1
|
* Add unit tests and fixtures for OfflineDatabase::mergeDatabaseAsheem Mamoowala2018-08-281-0/+203
|
* [core] offline region definition - add support for arbitrary geometriesIvo van Dongen2018-08-201-39/+57
|
* [core] recreate offline database when it is deleted out from under our feetKonstantin Käfer2018-08-141-4/+4
|
* WIP: use expected<T, E> for passing on errorsKonstantin Käfer2018-08-141-18/+19
|
* [core] harden OfflineDatabaseKonstantin Käfer2018-08-141-152/+440
|
* [android, linux] Upgrade to SQLite 3.24.0, compiled to minimize binary sizeJohn Firebaugh2018-08-101-6/+10
|
* [core] Fix GCC8's new -Wcatch-value warningsZsolt Bölöny2018-06-251-1/+1
| | | Polymorphic types shouldn't be caught by value, as the warning message says. Catch them by constant reference instead.
* [core] consolidate database opening workflowKonstantin Käfer2018-06-121-24/+1
| | | | | | | | Before this change, we've tried to open the database in read/write, but not create mode. In situations where the database didn't exist yet, this logged an error to the console, and we proceeded to opening it again in read/write/create mode, which actually created the file. The reason we did this is so that we could detect really old caching databases from January 2016 in case a developer upgraded from an older SDK (iOS v3.1 and earlier, Android v3.2 and earlier) that didn't have https://github.com/mapbox/mapbox-gl-native/pull/3715 yet. However, these error messages, while innocent, look scary in the console and some users suspect that it's a bug. This change opens the file directly in read/write/create mode, omitting the first failed attempt. To handle old cache databases, we're now deleting the `http_cache` table, which was the only table in those old databases, and create the new schema, rather than deleting the entire file and recreating the Database object. In most scenarios, this will lead to one fewer opening attempt, while the database migration will continue to work for the few users who upgrade all the way from a January 2016 SDK. Additionally, this fixes a mismatch between the Qt and non-Qt implementation: Qt doesn't support opening a file in read/write mode without the create flag. This means that we've seen a different control flow on Qt compared to the non-Qt implementation when opening a database.
* [core] support moving Database object during a TransactionKonstantin Käfer2018-06-121-1/+0
|
* [test] verify log messages of OfflineDatabase testsKonstantin Käfer2018-06-121-19/+127
|
* [test] standardize on database file name and move I/O functions to utilKonstantin Käfer2018-06-121-76/+47
|
* [test] pull out using namespace mbgl to reduce verbosityKonstantin Käfer2018-06-121-66/+3
|
* [core] offline database - batch region resource insertsIvo van Dongen2018-06-041-0/+54
|
* Avoid exceptions for flow control during database creationJohn Firebaugh2018-05-091-6/+6
| | | | Unfortuntely, it's difficult to avoid all exceptions, because sqlite3_open_v2 does not reliably return SQLITE_NOTADB if the file is not a database. However, this should avoid cases where developers misinterpret the SQLITE_CANTOPEN exception as a crash, which is the common case.
* [core, qt] move self-resetting Statement/Query object to shared headerKonstantin Käfer2018-03-021-21/+26
|
* [tests] Added a test for getting resources from the databaseThiago Marcos P. Santos2018-02-261-0/+34
| | | | This test would have flagged the Qt regression.
* [test] Only use our SQLite3 wrapper in testsBruno de Oliveira Abinader2018-01-081-44/+2
|
* [tests] Enforce the schema downgrade behaviorThiago Marcos P. Santos2017-08-221-0/+24
| | | | Which is, delete and recreate the database.
* [core] finish must-revalidate supportKonstantin Käfer2017-08-081-15/+54
|
* [core] remove trailing whitespace, add trailing newlines, add space after //Konstantin Käfer2017-01-271-2/+2
|
* [Qt] Implement mapbox::sqlite::{Database,Statement} using QtSqlBruno de Oliveira Abinader2017-01-231-19/+0
|
* [core] Move lastInsertRowId/changes to sqlite::StatementBruno de Oliveira Abinader2017-01-231-0/+19
|
* [core] Optimize OfflineDownload::ensureResource (#6707)Tore Halset2016-10-171-0/+53
| | | Add `OfflineDatabase::hasRegionResource`, for use when the actual contents are not needed by the caller, avoiding IO and decompression costs.