summaryrefslogtreecommitdiff
path: root/test/storage
Commit message (Collapse)AuthorAgeFilesLines
* [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-213-35/+117
|
* [build] rework platform/default directory and add -files.txt for vendored libsKonstantin Käfer2018-12-143-3/+3
|
* [core] Fixed {prefix} evaluationMinh Nguyễn2018-11-211-3/+3
| | | | This appears to have been an attempt to use the std::string fill constructor, but it ended up creating a one-character-long string and attempting to overwrite the null terminator.
* [core] add test about number of maximum concurrent requestsHuyen Chau Nguyen2018-11-152-3/+12
|
* [core] define number of concurrent downloads in online file source variableHuyen Chau Nguyen2018-11-151-2/+2
|
* [test] Add test for when requesting the same resource many timesThiago Marcos P. Santos2018-11-131-1/+19
| | | | This test would have prevented the crash fixed by the previous patch.
* [core] add tests for handling requests with different prioritiesHuyen Chau Nguyen2018-10-232-1/+92
| | | | | | - ensure that low priority requests are handled last - add option to set the number of maximum concurrent requests for tests - some style fixups
* [core] add priorities to resourcesHuyen Chau Nguyen2018-10-232-3/+63
| | | | | - priorities can be low or regular - offline downloads should have low priority to not throttle "regular requests"
* [core] Always request 1x and @2x sprite images for portabilityKonstantin Käfer2018-09-241-5/+7
| | | | When creating a offline region, we've previously only requested the sprite image for the specified resolution. This lead to offline packs not being usable on devices that have a different pixel ratio. We're now requesting both 1x and 2x sprites. Some devices use even higher or fractional pixel ratios. However, we only ever use 1x and 2x sprite images in our requests.
* [android] add support for gnustlKonstantin Käfer2018-09-112-4/+6
|
* 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-203-91/+81
|
* [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-142-19/+20
|
* [test] add test for pending offline download when the disk is fullKonstantin Käfer2018-08-141-1/+77
|
* [core] harden OfflineDatabaseKonstantin Käfer2018-08-143-190/+487
|
* [android, linux] Upgrade to SQLite 3.24.0, compiled to minimize binary sizeJohn Firebaugh2018-08-101-6/+10
|
* Revert "[core] Replace Boost.Spirit with std::regex in CacheControl::parse()"Bruno de Oliveira Abinader2018-08-081-9/+0
| | | | This reverts commit 990b3b11b9427ffd86f693d3f4c3dd351891e5d0.
* [core] Replace Boost.Spirit with std::regex in CacheControl::parse()Bruno de Oliveira Abinader2018-08-081-0/+9
|
* [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-122-27/+4
| | | | | | | | 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-122-2/+30
|
* [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-092-16/+13
| | | | 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-022-35/+42
|
* [core] refactor SQLite error/status codesKonstantin Käfer2018-03-021-1/+1
|
* [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.
* [core] align implementations of local and asset file sourceKonstantin Käfer2018-01-252-0/+52
|
* [test] Only use our SQLite3 wrapper in testsBruno de Oliveira Abinader2018-01-081-44/+2
|
* [core] correctly alter sprite URLs when attaching sprite.png/sprite.json ↵Konstantin Käfer2017-10-171-0/+8
| | | | filenames
* [core] Move SourceType to the 'style' namespaceAnand Thakker2017-10-161-0/+1
|
* [core] make forcing cache/network only more explicitKonstantin Käfer2017-10-121-13/+13
| | | | | | Previously, we used the existence of a `prior*` field in the Resource object as an indication for whether we should consult the cache or not. However, this is prone to error, since a failed cache lookup won't set any prior fields. Therefore, we manually set `priorExpires` to 0. This in turn triggered another bug where generated wrong expiration timestamps when the server response we got was expired (or expired between sending and receiving). This commit changes the flags so that we can now explicitly request CacheOnly/NetworkOnly (or All) loading methods, rather than the implicit Optional/Required naming scheme.
* [core] fix loading of stale must-revalidate resourcesKonstantin Käfer2017-09-251-0/+78
| | | | | | In https://github.com/mapbox/mapbox-gl-native/pull/9670, we implemented support for the Cache-Control: must-revalidate header. While we now respect this header and don't show resources that are stale and have this header set, the optional cache request never completes. This means we're also never going to try to actually get a fresh tile and just never show this tile anymore. This commit fixes this by responding with a Not Found error when the resource is unusable (= stale and has must-revalidate set). Since we actually still have the data (but can't use it due to caching rules), we're responding with the data as well. To avoid a second cache hit, tile_loader_impl.hpp now passes on the data from the Optional to the Required request so that it can be reused when we get a 304 Not Modified response from the server.
* Fast tileCount with help from @mapbox/sphericalmercator moduleAsheem Mamoowala2017-09-081-0/+8
|
* [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-085-50/+154
|
* [tests] Add test to enforce database not found behaviorThiago Marcos P. Santos2017-07-171-0/+11
| | | | | | Make sure all the implementations, currently Qt and Default, throw an exception with error code CANTOPEN when opening a database that doesn't exist without the CREATE flag.
* [core] Use the ResourceTransform instead of callbacksThiago Marcos P. Santos2017-06-261-3/+22
| | | | | Based on the actor model, can be considered safer to use since we don't need to worry about object lifetime anymore.
* [core] Rename ThreadedObject to ThreadThiago Marcos P. Santos2017-06-211-4/+4
| | | | | Now that the old Thread class is gone, we can give ThreadedObject a better name.
* [core] Convert AssetFileSource to ThreadedObjectThiago Marcos P. Santos2017-06-211-16/+9
|
* [core] Offline support for Image SourcesAsheem Mamoowala2017-06-012-3/+15
|
* [tidy] modernize-deprecated-headersBruno de Oliveira Abinader2017-05-121-1/+1
|
* [android] use AAssetManager instead of libzipKonstantin Käfer2017-04-241-20/+9
|
* [core] Cache file source base URL and access tokenJesse Bounds2017-03-011-0/+16
| | | | | This caches the base URL and access token values when they are set so that they can still be retrieved even when the thread is paused.