diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2016-12-06 19:44:57 -0500 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2016-12-06 19:44:57 -0500 |
commit | e1b0317c04124b4fc72f14dee1c2125cf970b0e0 (patch) | |
tree | 3d5b11d6d24cd10dd01add6626418c194de484c3 /indra/llcorehttp/tests/test_llcorehttp_peer.py | |
parent | 43c9a7d706d3cdf72f861f89e9968342513d55b8 (diff) |
DRTVWR-418: Remove duplicate testrunner.py
Diffstat (limited to 'indra/llcorehttp/tests/test_llcorehttp_peer.py')
-rwxr-xr-x | indra/llcorehttp/tests/test_llcorehttp_peer.py | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/indra/llcorehttp/tests/test_llcorehttp_peer.py b/indra/llcorehttp/tests/test_llcorehttp_peer.py index 59acfc39c4..caa204b519 100755 --- a/indra/llcorehttp/tests/test_llcorehttp_peer.py +++ b/indra/llcorehttp/tests/test_llcorehttp_peer.py @@ -40,10 +40,14 @@ try: except ImportError: from StringIO import StringIO from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler -from SocketServer import ThreadingMixIn from llbase.fastest_elementtree import parse as xml_parse from llbase import llsd + +# we're in llcorehttp/tests ; testrunner.py is found in llmessage/tests +sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, + "llmessage", "tests")) + from testrunner import freeport, run, debug, VERBOSE class TestHTTPRequestHandler(BaseHTTPRequestHandler): @@ -269,7 +273,7 @@ class TestHTTPRequestHandler(BaseHTTPRequestHandler): # Suppress error output as well pass -class Server(ThreadingMixIn, HTTPServer): +class Server(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 @@ -280,16 +284,10 @@ class Server(ThreadingMixIn, HTTPServer): # default behavior which *shouldn't* cause the program to return # a failure status. def handle_error(self, request, client_address): - print >>sys.stderr, '-'*40 - print >>sys.stderr, 'Ignoring exception during processing of request from', client_address - print >>sys.stderr, '-'*40 - - def shutdown_request(self, *args, **kwds): - try: - # just forward to base-class method, but wrap in try/except - HTTPServer.shutdown_request(self, *args, **kwds) - except Exception as err: - print >>sys.stderr, "Once more ignoring: %s" % err + print '-'*40 + print 'Ignoring exception during processing of request from', + print client_address + print '-'*40 if __name__ == "__main__": do_valgrind = False |