summaryrefslogtreecommitdiff
path: root/test/storage/offline_download.test.cpp
diff options
context:
space:
mode:
authorChris Loer <chris.loer@gmail.com>2018-09-18 15:06:40 -0700
committerKonstantin Käfer <mail@kkaefer.com>2018-09-26 20:43:24 +0200
commit368ee1bdfb315b1ec47a7123618a9074f6865b7b (patch)
treed427171e14a9e844c203cdd2d12c722abc3ea002 /test/storage/offline_download.test.cpp
parent4e16e2b17961075cd698ee5380941d5593a74e1a (diff)
downloadqtlocation-mapboxgl-upstream/nitpick-format.tar.gz
[core, offline] Limit offline downloads to use half of maximum concurrent file requests.upstream/nitpick-format
Fixes issue #12655: don't let offline downloads starve interactive tile downloads.
Diffstat (limited to 'test/storage/offline_download.test.cpp')
-rw-r--r--test/storage/offline_download.test.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/storage/offline_download.test.cpp b/test/storage/offline_download.test.cpp
index 5fc0e752df..677cb3acfc 100644
--- a/test/storage/offline_download.test.cpp
+++ b/test/storage/offline_download.test.cpp
@@ -297,7 +297,7 @@ TEST(OfflineDownload, DoesNotFloodTheFileSourceWithRequests) {
fileSource.respond(Resource::Kind::Style, test.response("style.json"));
test.loop.runOnce();
- EXPECT_EQ(HTTPFileSource::maximumConcurrentRequests(), fileSource.requests.size());
+ EXPECT_EQ(std::max<uint32_t>(HTTPFileSource::maximumConcurrentRequests() / 2, 1), fileSource.requests.size());
}
TEST(OfflineDownload, GetStatusNoResources) {