Alexander Shalamov
30aaa76910
[core] Add unit tests for ambient cache size
2020-03-07 10:14:18 +02:00
Mikhail Pozdnyakov
91437d8101
Add OfflineDownload.NoFreezingOnNotFoundError unit test
2020-02-28 12:52:26 +02:00
Mikhail Pozdnyakov
ba4f5efa09
[core] OnlineFileSource is never accessed directly
2020-02-26 22:31:59 +02:00
Mikhail Pozdnyakov
aad13f6a3f
[core] FileSourceManager::getFileSource() returns PassRefPtr
2020-02-26 22:31:59 +02:00
Mikhail Pozdnyakov
c85e7cbce0
Add OfflineDownload.NoFreezingOnCachedTilesAndNewStyle unit test
2020-02-25 23:15:47 +02:00
Mikhail Pozdnyakov
7c48611f9e
[core] Consolidate file source keys in the generic FileSource header
...
Thus we do not need to include specific headers to use `{set|get}Property`
API with key constants.
2020-02-25 23:15:47 +02:00
Juha Alanen
a4c4de2828
[test] Fix failing tests on iOS
2020-02-14 12:01:52 +02:00
Alexander Shalamov
f42b5e94ed
[core] Add unit test
2020-02-14 11:54:02 +02:00
Mikhail Pozdnyakov
bdd7324d62
Add OfflineDatabase.UpdateDatabaseReadOnlyMode unit test
2020-02-07 14:39:03 +02:00
Mikhail Pozdnyakov
2365cab58c
Add OfflineDatabase.PutResourceReadOnlyMode unit test
2020-02-07 14:39:03 +02:00
Juha Alanen
aed25c0438
[test] Improve the stability of a test on Android
2020-02-06 17:52:12 +02:00
Juha Alanen
f2845990bb
[test] Remove node.js based HTTP server
2020-01-30 13:52:09 +02:00
Alexander Shalamov
96dd401f3e
[core] Add unit test for pausing & resuming database fs
2020-01-27 14:25:37 +03:00
Alexander Shalamov
879c44f661
[core] Modularize FileSource codebase ( #15768 )
...
* [core] Introduce FileSourceManager and use it for default platform impl
- Add `FileSourceManager` interface that provides access to `FileSource`
instances and means of registering / unregistering `FileSource` factories
- Split `DefaultFileSource` into smaller parts
- Add `DatabaseFileSource` interface and it's default implementation
- Remove inter-dependencies between concrete `FileSource` classes
* [build] Add files to next build system
* [core] Add generic property setters / getters
* [core] Remove setOnlineStatus from OnlineFileSource interface
* [core] Hide threading implementation details from DatabaseFileSource interface
* [core] Make DB file source methods virtual
* [core] Add documentation for DatabaseFileSource and rename one method
* [core] Use simple callback instead of ActorRef
* [core] Remove ActorRef from OnlineFileSource public header
* [core] Add callback to FileSource::forward async API
* [core] Pass OfflineRegionDefinition by value
* [core] Update tests to use modular file sources
* [core] Update unit tests
* [core] Update unit tests after rebase
* [core] Backport low prio fix for cached requests
* [core] Backport pack database
* [core] Return removed factory from unRegisterFileSourceFactory
* [core] Rename shadowed args in onlinefilesource
* [core] Remove simple std::function callback aliases
* [core] Expose online file source property keys in public header file
* [test-runner] Add proxy file source test runner
* [cache] Update mbgl-cache utility to use new file source
* [metrics] Rebaseline binary size metrics
* [offline] Update offline utility
* [core] Update changelog
2020-01-13 10:57:23 +02:00
Mikhail Pozdnyakov
28ccb0ccc0
[core] Offline download must clear batch buffer at load interrupt
...
Otherwise, the stale buffer data are processed again at the
repeated load. It is causing various problems like missing load
completion notification or crashes (if the previously used observer
instance has been deleted).
2019-12-18 17:19:15 +02:00
Mikhail Pozdnyakov
6d4e5f57ec
[core] Add OfflineDatabase.Pack unit test
2019-12-02 13:46:51 +02:00
Mikhail Pozdnyakov
4c49f0c9db
[core] Introduce OfflineDatabase::runPackDatabaseAutomatically() API
...
- added a unit test
- Updated inline comments in default_file_source.hpp
2019-12-02 13:46:51 +02:00
Thiago Marcos P. Santos
91d83accde
[tests] Increase test tolerance
...
This test has been flaky on mac.
2019-11-27 18:32:58 +02:00
Juha Alanen
d777ba54bd
[test] Add test for priority of online requests for expired resources
2019-11-21 14:39:47 +02:00
Mikhail Pozdnyakov
615e095ed6
[core] OfflineDatabase pack API
...
- introduce `OfflineDatabase::pack()` standing for incremental vacuum
- make pack optional at offline region deletion
- update `OfflineDatabase.DeleteRegion` test accordingly to the items above
2019-11-12 17:24:50 +02:00
Mikhail Pozdnyakov
ab603c5fed
[core] Enable incremental vacuum for Offline DB
...
Thus we avoid re-creating the whole database and keeping the backup file as it happens on calling VACUUM.
2019-10-22 15:51:16 +03:00
Thiago Marcos P. Santos
c7bbd5bbef
[core] Fix performance-move-const-arg
2019-09-25 18:59:07 +03:00
Mikhail Pozdnyakov
6899337f86
[core] Add Map.Issue15342 unit test
...
The newly added test checks the fix for constant repaint,
caused by `RenderSource::hasFadingTiles()` returning `true` all the time.
2019-09-12 00:40:08 +03:00
Alexander Shalamov
92b3386dec
[core] Add unit test to verify that Offline usage tag is not set
...
New unit test checks that Offline usage flag is not set for invalidated
offline region resource requests.
2019-09-11 10:47:55 +03:00
Konstantin Käfer
c7be3d52a7
Always call onSourceLoaded observers ( #15548 )
...
* [core] add sources to source collection before triggering load
* [test] add testcase for #15514
* [core] also call onSourceLoaded observers when no network request was necessary
2019-09-03 17:02:23 -07:00
Bruno de Oliveira Abinader
544aabd020
[core] Add requiredTileCount to OfflineRegionStatus
2019-08-29 18:22:59 +03:00
Mikhail Pozdnyakov
f84e46ad26
[core] Mark offline region resources in batches
2019-08-29 17:28:51 +03:00
Jason Wray
5722136680
[core] Disable flaky OfflineDatabase.MaximumAmbientCacheSize test
2019-08-07 10:42:35 -07:00
Thiago Marcos P. Santos
24df7fe5f5
[core] Add storage unit tests for MapboxTileLimitExceeded
2019-06-19 17:19:10 +03:00
Thiago Marcos P. Santos
1977934bdb
[tests] Add unit tests for cache size
2019-06-18 16:26:51 +03:00
Thiago Marcos P. Santos
68e3cbacbc
[core] Add method for setting a maximum size for the ambient cache
...
- 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.
2019-06-18 16:26:51 +03:00
Thiago Marcos P. Santos
78eeffe171
[core] Clear/Invalidate should also work on non-tile resources
...
These methods were only affecting tiles, but they should really
work on every resource like style, glyphs, etc.
2019-06-18 16:26:51 +03:00
Thiago Marcos P. Santos
59e7b9a878
[core] Rename resetCache to resetDatabase
...
Avoid confusion about what is being reset. In this case, the whole
database and not only the ambient cache.
2019-06-18 16:26:51 +03:00
Thiago Marcos P. Santos
9beb740fb7
[tests] Follow-up of previews PR, these tests need write permission
2019-06-18 16:26:51 +03:00
Thiago Marcos P. Santos
9815fc0d16
[tests] Improve unit test for deleting offline region and concurrent use
...
Test if the physical size of the database will also reduce.
Clear the cache while adding resource on another connection.
2019-06-13 22:28:16 +03:00
Thiago Marcos P. Santos
4b1f9a3b3f
[tests] Add unit test for clearing the ambient cache
2019-06-13 22:28:16 +03:00
Thiago Marcos P. Santos
33ee7e23de
[core] Remove priority from the constructor
...
Make the constructor less verbose and set good defaults.
2019-05-28 16:30:49 +03:00
Thiago Marcos P. Santos
cc26ef17d5
[core] Introduce usage tag for resources
...
Make the distinction if a resource is being requested for offline
usage or if it will be used immediately.
Fixes #14746
2019-05-28 16:30:49 +03:00
Łukasz Paczos
46ef2d86d2
[core] invoke optional resource path change completion listener
2019-05-24 15:03:55 +02:00
Thiago Marcos P. Santos
19f5686eb2
[tests] Add unit tests for offline data invalidation
2019-05-21 01:04:01 +03:00
Sudarsana Babu Nagineni
a31734ddad
[test] Add unit test for clearCache API
2019-04-29 17:09:58 +03:00
Konstantin Käfer
3ceabcd3ec
[core] clang-tidy fixes
2019-04-05 11:49:17 +02:00
Łukasz Paczos
3f7b70fdb0
[core] expose an option to change the db file path in runtime
2019-03-13 18:28:04 +01:00
Chris Loer
b7e2b11a75
[core] Support for excluding ideographic glyphs from offline downloads.
2018-12-21 15:13:48 -08:00
Konstantin Käfer
1d8235f5b8
[build] rework platform/default directory and add -files.txt for vendored libs
2018-12-14 11:03:03 +01:00
Minh Nguyễn
7d5be980e2
[core] Fixed {prefix} evaluation
...
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.
2018-11-21 09:54:05 -08:00
Huyen Chau Nguyen
8d0b06d5dd
[core] add test about number of maximum concurrent requests
2018-11-15 12:19:48 -08:00
Huyen Chau Nguyen
9a606caf0b
[core] define number of concurrent downloads in online file source variable
2018-11-15 12:19:48 -08:00
Thiago Marcos P. Santos
01d9005c3b
[test] Add test for when requesting the same resource many times
...
This test would have prevented the crash fixed by the previous patch.
2018-11-13 23:26:34 +02:00
Huyen Chau Nguyen
fa78bcadfd
[core] add tests for handling requests with different priorities
...
- ensure that low priority requests are handled last
- add option to set the number of maximum concurrent requests for tests
- some style fixups
2018-10-23 12:47:10 +02:00