From 9279b198df7c1c9e93f3c2af2a7104d4a30367a8 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Mon, 6 Feb 2017 19:48:58 +0100 Subject: [PATCH] [test] Added a test to make sure 404 does not trigger a retry --- test/util/http_timeout.test.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/util/http_timeout.test.cpp b/test/util/http_timeout.test.cpp index e9899f956..c9373d955 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));