summaryrefslogtreecommitdiff
path: root/test/storage
Commit message (Collapse)AuthorAgeFilesLines
* [core] Clean up ThreadContext vestigesJohn Firebaugh2016-04-151-1/+1
|
* [tests] Rationalize storage testsJohn Firebaugh2016-04-1417-899/+639
| | | | Properly divide Storage tests into DefaultFileSource, OnlineFileSource, and HTTPFileSource tests.
* [core] Demote "Unable to make space for entry" message from Warning to Debug ↵John Firebaugh2016-04-141-6/+2
| | | | (#4708)
* [build] Refactor and simplify build systemJohn Firebaugh2016-04-072-22/+0
| | | | | | | | | | | | | | * Main gyp files are now standardized as platform/<platform>/platform.gyp. * Each platform gyp file defines appropriate loop_lib and headless_lib variables. * Each platform gyp file includes mbgl.gypi, which defines base targets which may be useful to all platforms. * CI targets are consistent across platforms: `make $(PLATFORM) && make test-$(PLATFORM)`. * Renamed the "linux" test app to "glfw". It's now built in OS X CI. * Android build flakiness is fixed. * iOS CI builds the bench and iosapp targets. * Mesa version is now in one place. * CI scripts use bash "strict mode" and correct error handling. * All build output goes to the build directory. * Removed vestigial iOS/OS X/Android Travis scripts.
* Merge branch 'release-ios-3.2.0-android-4.0.0'John Firebaugh2016-03-302-4/+96
|\
| * [core] Set schema version to 3 after upgradingJohn Firebaugh2016-03-281-0/+8
| | | | | | | | | | | | The migration was upgrading the schema, but not the schema version. As a result, the (expensive) migration was running every time an OfflineDatabase was constructed with a v2 database. Fixes #4501
| * [core] Stop download when tile limit is reachedJesse Bounds2016-03-171-4/+60
| | | | | | | | | | | | | | | | The tile limit guard (when used) stops a download from continuing when the tile limit is reached. This wraps the guard in a method and employs it in both places currently necessary to ensure the guard has a chance to function. Tests have been updated to ensure the fix works for a less trivial tile limit scenario.
| * [core] Implement a vacuum strategy for the offline databaseJohn Firebaugh2016-03-171-0/+28
| | | | | | | | Enable `PRAGMA auto_vacuum = INCREMENTAL`, and perform a `PRAGMA incremental_vacuum` when deleting an offline region.
* | [core] Unify FileRequest and WorkRequestJohn Firebaugh2016-03-2411-38/+38
| |
* | [tests] Mark some tests as requiring serverThiago Marcos P. Santos2016-03-233-5/+5
| | | | | | | | | | | | Otherwise they will fail on iOS with connection error. Fixex #4434
* | [tests] Tweak offline tests to work on iOSJohn Firebaugh2016-03-221-17/+8
| |
* | [ios] make unit tests work on iOS and iOS SimulatorKonstantin Käfer2016-03-2213-28/+37
| |
* | [test] rearrange test files so they're not in the fixtures folderKonstantin Käfer2016-03-225-8/+6
| |
* | [tests] Add utest to make sure prior expiration time is being respectedThiago Marcos P. Santos2016-03-171-0/+35
|/
* [core] Deactivate offline region upon completionMinh Nguyễn2016-03-111-6/+15
|
* [core] Deactivate OfflineDownload when the tile count limit is hitJohn Firebaugh2016-03-091-1/+13
| | | | This is a better behavior than sending hundreds or thousands of tileCountLimitExceeded notifications.
* [core] Fix offline status reporting regressionsJohn Firebaugh2016-03-081-12/+38
| | | | | | The core of the change is ensuring that ensureResource doesn't release Zalgo: it should be consistently async, rather than async in the case that the resource doesn't exist in the database, but sync if it does. This ensures that status is reported in a more consistent sequence, regardless of the database state.
* [tests] Add utest for NetworkStatus::Online/OfflineThiago Marcos P. Santos2016-03-081-0/+33
|
* [core] Ensure OfflineRegionStatus::downloadState is accurately reportedJohn Firebaugh2016-03-071-0/+31
|
* [core] explicitly initialize a few fields to nullKonstantin Käfer2016-03-041-2/+2
|
* [core] Fix offline status reporting with pre-existing tiles (#4147)John Firebaugh2016-03-041-0/+75
|
* [tests] Unit tests for clock skew retry timeoutThiago Marcos P. Santos2016-02-262-0/+40
|
* [tests] Add a test for the retry delay on expired responseThiago Marcos P. Santos2016-02-261-0/+35
|
* [core] Limit total number of offline Mapbox tilesJohn Firebaugh2016-02-242-0/+90
|
* [core] Enforce foreign key constraints in the offline databaseJohn Firebaugh2016-02-242-10/+33
|
* [core] Fix subtle bug in OfflineDatabase with updated resourcesJohn Firebaugh2016-02-241-13/+37
| | | | | | SQLite REPLACE is *not* UPSERT. If a conflict occurs, it first deletes the existing row, then inserts a new row. This means that AUTOINCREMENT primary keys change. This will break foreign keys to that value, which we use. Instead we must try an UPDATE, and fall back to an INSERT if the UPDATE changes zero rows.
* [core] status.requiredResourceCountIsIndeterminate ⇢ ↵John Firebaugh2016-02-241-7/+7
| | | | | | status.requiredResourceCountIsPrecise Change the name and reverse the sense. Naming things in the positive is better than naming them in the negative.
* [tests] Add utests for HTTP 200 with no dataThiago Marcos P. Santos2016-02-232-0/+29
| | | | The implementation should return a valid empty string.
* [tests] Timer is not needed to keep the main loop aliveThiago Marcos P. Santos2016-02-221-5/+0
| | | | The loop will be alive until `.stop()` is called.
* [tests] Fix compilation error in test/storage/headers.cppBruno de Oliveira Abinader2016-02-161-13/+13
| | | | | | error: converting ‘false’ to pointer type for argument 1 of ‘char testing::internal::IsNullLiteralHelper(testing::internal::Secret*)’ [-Werror=conversion-null]
* [tests] Fix buildJohn Firebaugh2016-02-111-1/+1
|
* [core] Always store tiles without ratio support with ratio = 1John Firebaugh2016-02-101-8/+18
|
* [core] Optimize offline database schemaJohn Firebaugh2016-02-101-5/+6
| | | | | * Under the hood, SQLite creates surrogate keys (ROWID) anyway. We may as well take advantage of this and use the surrogates for foreign keys as well, since they are simpler and more efficient than compound foreign keys. * Create indexes for efficient eviction queries
* [core] Retry errors encountered during offline downloadsJohn Firebaugh2016-02-101-0/+32
|
* [core] Eliminate maximumCacheEntrySizeJohn Firebaugh2016-02-101-26/+44
| | | | Instead, the eviction policy accounts for the actual size needed for an incoming put.
* [core] Implement an eviction policy for OfflineDatabaseJohn Firebaugh2016-02-101-0/+72
| | | | | | | | | | | | | When inserting an cached resource, or removing a region, remove least-recently used resources and tiles, not used by offline regions, until the used database size, as calculated by multiplying the number of in-use pages by the page size, is less than the maximum cache size minus 5 times the page size. In addition, OfflineDatabase may be configured to ignore cache puts of individual resources larger than a certain size. This policy is similar but not identical to the former SQLiteCache policy: * It accounts for offline, by exempting resources required by offline regions from eviction. * It must delete from two tables (resources and tiles), rather than one. Currently the strategy is naive: evict 50 rows at a time from each table. * It makes maximumCacheSize and maximumCacheEntrySize completely independent. The SQLiteCache implementation evicted when `usedSize > maximumCacheSize - 2 * maximumCacheEntrySize`. This evicts when `usedSize > maximumCacheSize - 5 * pageSize`. * It uses a non-unlimited default value for maximumCacheSize: 50 MB. We should have always had a limit in place; "a cache without an eviction policy is a resource leak".
* [core] Reset SQLite statements after use in order to release locksJohn Firebaugh2016-02-101-0/+32
|
* Add binary for smoke-testing offline downloadsJohn Firebaugh2016-02-101-17/+0
|
* [core] Interface and implementation for offlineJohn Firebaugh2016-02-103-0/+451
|
* [all] Don't interpret 404s on non-tile resources as "no content"John Firebaugh2016-02-103-7/+61
|
* [all] Do not set Response data for 404sJohn Firebaugh2016-02-102-6/+3
| | | | For AssetFileSource and the node FileSource this was already the case; this makes the other implementations consistent.
* [core] Reimplement existing caching within an offline-capable database schemaJohn Firebaugh2016-02-108-975/+422
|
* [core] Moving caching logic to DefaultFileSourceJohn Firebaugh2016-02-1011-43/+32
| | | | This results in OnlineFileSource containing precisely the logic we want for reuse by OfflineFileSource, and no more.
* [tests] Add test for AssetFileSource URL encodingJohn Firebaugh2016-02-081-0/+21
|
* [core] Remove Response::Error::Reason::CanceledJohn Firebaugh2016-02-041-1/+0
| | | | There is no such thing as a cancelled response, only cancelled requests. A request that is cancelled does not have its callback called with a Response.
* [core] Rationalize Resource initializationJohn Firebaugh2016-01-291-0/+50
|
* Cleanup std::chrono usageBruno de Oliveira Abinader2016-01-252-4/+5
| | | | Use mbgl::Duration and mbgl::{,Milli}Seconds whenever possible.
* [core] Include prior values of caching headers in ResourceJohn Firebaugh2016-01-221-4/+2
| | | | This allows the FileSource interface itself to support revalidation. We could (and probably should) now rewrite HTTPContextBase implementations as FileSource implementations.
* [core] Polyfill std::chrono::absJohn Firebaugh2016-01-221-3/+1
|
* [core] Merge rfc1123, iso8601, and parse_date into chrono.hpp and fix their APIJohn Firebaugh2016-01-221-1/+0
|