summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <thiago@mapbox.com>2017-02-06 19:48:58 +0100
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2017-02-07 12:17:40 +0100
commit9279b198df7c1c9e93f3c2af2a7104d4a30367a8 (patch)
treebcbd64e15afe47168181b7cb2476664da8f484ae
parent318690645eb57e5c0092574e54a660991383dbec (diff)
downloadqtlocation-mapboxgl-9279b198df7c1c9e93f3c2af2a7104d4a30367a8.tar.gz
[test] Added a test to make sure 404 does not trigger a retry
-rw-r--r--test/util/http_timeout.test.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/util/http_timeout.test.cpp b/test/util/http_timeout.test.cpp
index e9899f9560..c9373d955d 100644
--- a/test/util/http_timeout.test.cpp
+++ b/test/util/http_timeout.test.cpp
@@ -11,6 +11,11 @@ TEST(HttpRetry, OtherError) {
ASSERT_EQ(Duration::max(), errorRetryTimeout(Response::Error::Reason::Other, 1));
}
+TEST(HttpRetry, NotFound) {
+ // Non-retryable
+ ASSERT_EQ(Duration::max(), errorRetryTimeout(Response::Error::Reason::NotFound, 1));
+}
+
TEST(HttpRetry, ServerError) {
// 1-3 failures -> 1 sec
ASSERT_EQ(Seconds(1), errorRetryTimeout(Response::Error::Reason::Server, 1));