diff options
| author | Antony Lesuisse <al@openerp.com> | 2014-05-01 17:06:41 +0200 |
|---|---|---|
| committer | Antony Lesuisse <al@openerp.com> | 2014-05-01 17:06:41 +0200 |
| commit | 739793cdcd5bceaaa885efce577fe3c55c637de4 (patch) | |
| tree | 3890b9ebdda5c37a610b51efa3421a807f3d37a7 | |
| parent | abbe08f76a87be47c78abafa7b0af0064df3a6a4 (diff) | |
[FIX] tests race condition in phanthomjs tests
A deadlock occurs when
- phantomjs_test1 is executedd, enter_test_mode is activated
- console.log('ok') is issued, sigterm is sent to phantomjs_test1 process
- phantomjs_test1 is finished and leave_test_mode restores the registrymanager lock
- phantomjs_test1 process, just before dying, makes a last http request phantomjs_test1_last_request
- phantomjs_test1_last_request thread will wait for the registrymanager lock, when all tests will be completed
- phantomjs_test2 is run, enter_test_mode is activated
- phantomjs_test2 is reach its end and _wait_remaining_requests is called
- phantomjs_test2 _wait_remaining_requests hangs forever waiting for phantomjs_test1_last_request
bzr revid: al@openerp.com-20140501150641-ua0b7pntesgm3n5p
| -rw-r--r-- | openerp/tests/common.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/openerp/tests/common.py b/openerp/tests/common.py index e881959a31b..1d9841692e7 100644 --- a/openerp/tests/common.py +++ b/openerp/tests/common.py @@ -229,6 +229,7 @@ class HttpCase(TransactionCase): # kill phantomjs if phantom.exit() wasn't called in the test if phantom.poll() is None: phantom.terminate() + phantom.wait() self._wait_remaining_requests() _logger.info("phantom_run execution finished") |
