summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/tests/test_llcorehttp_peer.py
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2012-06-19 15:43:29 -0400
committerMonty Brandenberg <monty@lindenlab.com>2012-06-19 15:43:29 -0400
commitf0353abe7605778048d69ce3acb8f5ddd5693083 (patch)
treeea684f04a37f467b1cea9b0db93d9f112644f1cd /indra/llcorehttp/tests/test_llcorehttp_peer.py
parent1cf8e785bad3562fac23feeb2343cfaec1b971bc (diff)
Implement timeout and retry count options for requests.
Pretty straightforward. Still don't like how I'm managing the options block. Struct? Accessors? Can't decide. But the options now speed up the unit test runs even as I add tests.
Diffstat (limited to 'indra/llcorehttp/tests/test_llcorehttp_peer.py')
-rw-r--r--indra/llcorehttp/tests/test_llcorehttp_peer.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/indra/llcorehttp/tests/test_llcorehttp_peer.py b/indra/llcorehttp/tests/test_llcorehttp_peer.py
index 8c3ad805b3..5f0116d384 100644
--- a/indra/llcorehttp/tests/test_llcorehttp_peer.py
+++ b/indra/llcorehttp/tests/test_llcorehttp_peer.py
@@ -31,6 +31,7 @@ $/LicenseInfo$
import os
import sys
+import time
from threading import Thread
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
@@ -97,6 +98,9 @@ class TestHTTPRequestHandler(BaseHTTPRequestHandler):
def answer(self, data):
debug("%s.answer(%s): self.path = %r", self.__class__.__name__, data, self.path)
+ if self.path.find("/sleep/") != -1:
+ time.sleep(30)
+
if "fail" not in self.path:
response = llsd.format_xml(data.get("reply", llsd.LLSD("success")))
debug("success: %s", response)