[test] Added a test to make sure 404 does not trigger a retry

This commit is contained in:
Thiago Marcos P. Santos
2017-02-06 19:48:58 +01:00
committed by Thiago Marcos P. Santos
parent 318690645e
commit 9279b198df

View File

@@ -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));