summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/tests/test_llcorehttp_peer.py
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2012-07-09 13:28:50 -0400
committerMonty Brandenberg <monty@lindenlab.com>2012-07-09 13:28:50 -0400
commit398d78a77348fb4c5ee4e96b7ed6f981b1042627 (patch)
treec20160703eebc38d8187189be1557153fa7c14dd /indra/llcorehttp/tests/test_llcorehttp_peer.py
parent348db20b92f1f1f85712c5a9a862ef079102bbee (diff)
Rework the 'sleep' logic in the test HTTP server so that the
30-second hang doesn't break subsequent tests. Did this by introducing threads into the HTTP server as I can't find the magic to detect that my client has gone away.
Diffstat (limited to 'indra/llcorehttp/tests/test_llcorehttp_peer.py')
-rw-r--r--indra/llcorehttp/tests/test_llcorehttp_peer.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/llcorehttp/tests/test_llcorehttp_peer.py b/indra/llcorehttp/tests/test_llcorehttp_peer.py
index 0e38e5a87f..9e1847c66e 100644
--- a/indra/llcorehttp/tests/test_llcorehttp_peer.py
+++ b/indra/llcorehttp/tests/test_llcorehttp_peer.py
@@ -32,10 +32,12 @@ $/LicenseInfo$
import os
import sys
import time
+import select
from threading import Thread
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
+from SocketServer import ThreadingMixIn
-mydir = os.path.dirname(__file__) # expected to be .../indra/llmessage/tests/
+mydir = os.path.dirname(__file__) # expected to be .../indra/llcorehttp/tests/
sys.path.insert(0, os.path.join(mydir, os.pardir, os.pardir, "lib", "python"))
from indra.util.fastest_elementtree import parse as xml_parse
from indra.base import llsd
@@ -144,7 +146,7 @@ class TestHTTPRequestHandler(BaseHTTPRequestHandler):
# Suppress error output as well
pass
-class Server(HTTPServer):
+class Server(ThreadingMixIn, HTTPServer):
# This pernicious flag is on by default in HTTPServer. But proper
# operation of freeport() absolutely depends on it being off.
allow_reuse_address = False