summaryrefslogtreecommitdiff
path: root/indra/llmessage
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2016-12-07 10:20:06 -0500
committerNat Goodspeed <nat@lindenlab.com>2016-12-07 10:20:06 -0500
commit2569a1701dd127ae89c4f9e4aaaa6af09fb28d28 (patch)
tree2e6f6a26c0e0a594d91523223de0b4c9fe66e7ff /indra/llmessage
parent0532e298a0550c70ca7d94992922d5c040e21702 (diff)
DRTVWR-418: Diagnostic prints to identify hangup
Diffstat (limited to 'indra/llmessage')
-rwxr-xr-xindra/llmessage/tests/testrunner.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/llmessage/tests/testrunner.py b/indra/llmessage/tests/testrunner.py
index 09f0f3c681..0a53c312fa 100755
--- a/indra/llmessage/tests/testrunner.py
+++ b/indra/llmessage/tests/testrunner.py
@@ -177,8 +177,14 @@ def run(*args, **kwds):
# We're not starting a thread, so shutdown() is a no-op.
shutdown = lambda: None
else:
+ # Make a function that reports when serve_forever() returns.
+ def serve_forever():
+ server_inst.serve_forever()
+ print "%s.serve_forever() returned" % server_inst.__class__.__name__
+ sys.stdout.flush()
+
# Make a Thread on which to call server_inst.serve_forever().
- thread = Thread(name="server", target=server_inst.serve_forever)
+ thread = Thread(name="server", target=serve_forever)
# Make this a "daemon" thread.
thread.setDaemon(True)
@@ -189,10 +195,16 @@ def run(*args, **kwds):
# sys.exit(0), apparently killing the thread causes the Python runtime
# to force the process termination code to 1. So try to play nice.
def shutdown():
+ print "Calling %s.shutdown()" % server_inst.__class__.__name__
+ sys.stdout.flush()
# evidently this call blocks until shutdown is complete
server_inst.shutdown()
+ print "%s.shutdown() returned" % server_inst.__class__.__name__
+ sys.stdout.flush()
# which should make it straightforward to join()
thread.join()
+ print "Thread.join() returned"
+ sys.stdout.flush()
try:
# choice of os.spawnv():