diff options
author | Logan Dethrow <log@lindenlab.com> | 2011-09-09 14:20:19 -0400 |
---|---|---|
committer | Logan Dethrow <log@lindenlab.com> | 2011-09-09 14:20:19 -0400 |
commit | 8a952e42e97cfb286192aba0fbfc43986912cd29 (patch) | |
tree | 6aa00aad42189239aa81972328e057afc215bf7d /indra/llmessage/tests/test_llsdmessage_peer.py | |
parent | c47b398b75fcdbb479ad9ad2765014c5fa338df7 (diff) | |
parent | 89b9800579a37fbbdfca7789716a2d012d96cfa5 (diff) |
Removed some spurious newlines that I introduced into CMakeLists.txt.
Diffstat (limited to 'indra/llmessage/tests/test_llsdmessage_peer.py')
-rw-r--r-- | indra/llmessage/tests/test_llsdmessage_peer.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/indra/llmessage/tests/test_llsdmessage_peer.py b/indra/llmessage/tests/test_llsdmessage_peer.py index 9886d49ccc..22edd9dad8 100644 --- a/indra/llmessage/tests/test_llsdmessage_peer.py +++ b/indra/llmessage/tests/test_llsdmessage_peer.py @@ -124,14 +124,19 @@ class TestHTTPRequestHandler(BaseHTTPRequestHandler): # Suppress error output as well pass +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 + if __name__ == "__main__": - # Instantiate an HTTPServer(TestHTTPRequestHandler) on the first free port + # Instantiate a Server(TestHTTPRequestHandler) on the first free port # in the specified port range. Doing this inline is better than in a # daemon thread: if it blows up here, we'll get a traceback. If it blew up # in some other thread, the traceback would get eaten and we'd run the # subject test program anyway. httpd, port = freeport(xrange(8000, 8020), - lambda port: HTTPServer(('127.0.0.1', port), TestHTTPRequestHandler)) + lambda port: Server(('127.0.0.1', port), TestHTTPRequestHandler)) # Pass the selected port number to the subject test program via the # environment. We don't want to impose requirements on the test program's # command-line parsing -- and anyway, for C++ integration tests, that's |