DRTVWR-418: Revamp testrunner to shutdown server Thread at end.
Instead of having testrunner.run()'s caller pass a Thread object on which to run the caller's server instance's serve_forever() method, just pass the server instance. testrunner.run() now constructs the Thread. This API change allows run() to also call shutdown() on the server instance when done, and then join() the Thread. The hope is that this will avoid the Python runtime forcing the process termination code to 1 due to forcibly killing the daemon thread still running serve_forever(). While at it, eliminate calls to testrunner.freeport() -- just make the runtime pick a suitable port instead.
Showing
- indra/llcorehttp/tests/test_llcorehttp_peer.py 6 additions, 11 deletionsindra/llcorehttp/tests/test_llcorehttp_peer.py
- indra/llmessage/tests/test_llsdmessage_peer.py 6 additions, 10 deletionsindra/llmessage/tests/test_llsdmessage_peer.py
- indra/llmessage/tests/testrunner.py 63 additions, 27 deletionsindra/llmessage/tests/testrunner.py
- indra/newview/tests/test_llxmlrpc_peer.py 16 additions, 11 deletionsindra/newview/tests/test_llxmlrpc_peer.py
Loading
Please register or sign in to comment