summaryrefslogtreecommitdiff
path: root/indra/newview/tests
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2013-05-10 09:32:30 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2013-05-10 09:32:30 -0400
commit96a2173c643e145a6f5d4964282c4d43f0fc0c3e (patch)
tree8002b3725edb3a142a9824e60151df10df840910 /indra/newview/tests
parent43224062a64cc658d429e434a7b673fac0b7c012 (diff)
SH-4176 WIP - allow retries on 4xx errors if enabled by flag. So enable in the case of appearance requests.
Diffstat (limited to 'indra/newview/tests')
-rwxr-xr-xindra/newview/tests/llhttpretrypolicy_test.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/indra/newview/tests/llhttpretrypolicy_test.cpp b/indra/newview/tests/llhttpretrypolicy_test.cpp
index ed7f3ba326..25e6de46d9 100755
--- a/indra/newview/tests/llhttpretrypolicy_test.cpp
+++ b/indra/newview/tests/llhttpretrypolicy_test.cpp
@@ -56,12 +56,19 @@ void RetryPolicyTestObject::test<1>()
template<> template<>
void RetryPolicyTestObject::test<2>()
{
- LLAdaptiveRetryPolicy retry404(1.0,2.0,3.0,10);
LLSD headers;
F32 wait_seconds;
-
- retry404.onFailure(404,headers);
- ensure("no retry on 404", !retry404.shouldRetry(wait_seconds));
+
+ // Normally only retry on server error (5xx)
+ LLAdaptiveRetryPolicy noRetry404(1.0,2.0,3.0,10);
+ noRetry404.onFailure(404,headers);
+ ensure("no retry on 404", !noRetry404.shouldRetry(wait_seconds));
+
+ // Can retry on 4xx errors if enabled by flag.
+ bool do_retry_4xx = true;
+ LLAdaptiveRetryPolicy doRetry404(1.0,2.0,3.0,10,do_retry_4xx);
+ doRetry404.onFailure(404,headers);
+ ensure("do retry on 404", doRetry404.shouldRetry(wait_seconds));
}
template<> template<>