webkitpy: fix race in unit tests for manager_worker_broker
authordpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Apr 2012 18:12:09 +0000 (18:12 +0000)
committerdpranke@chromium.org <dpranke@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Apr 2012 18:12:09 +0000 (18:12 +0000)
commit2f6f7cf27a65852c004c520488e34755dabf3af3
tree6e957f682f0085e339c552cb3995b316dfb08ee8
parent8326b6a3877ef4eaf3bd217802e601ebfa6f4dee
webkitpy: fix race in unit tests for manager_worker_broker
https://bugs.webkit.org/show_bug.cgi?id=84925

Reviewed by Ojan Vafai.

I have been intermittently seeing hangs when running
test-webkitpy on Mac SL; it appears that there's a bug (?) in
the multiprocessing module where queue references are getting
leaked or not cleaned up somehow. By explicitly closing the
queues, things seem to be happy, so this patch adds a cleanup()
method to the message broker and modifies the manager (and the
unit tests) to call it. This may get rid of the intermittent
error on shutdown on Linux I've seen as well.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._run_tests):
* Scripts/webkitpy/layout_tests/controllers/manager_worker_broker.py:
(_Broker.__del__):
(_Broker):
(_Broker.cleanup):
(_BrokerConnection.cleanup):
* Scripts/webkitpy/layout_tests/controllers/manager_worker_broker_unittest.py:
(_TestsMixin.test_name):
(_TestsMixin.test_cancel):
(_TestsMixin.test_done):
(_TestsMixin.test_unknown_message):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@115452 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/webkitpy/layout_tests/controllers/manager.py
Tools/Scripts/webkitpy/layout_tests/controllers/manager_worker_broker.py
Tools/Scripts/webkitpy/layout_tests/controllers/manager_worker_broker_unittest.py