Opened on 09/16/2015 at 09:18:36 AM
Closed on 09/21/2015 at 01:50:08 PM
#3081 closed change (fixed)
Enable threading for the flask web-server in the adblockpluscore run_tests.py script
Reported by: | kzar | Assignee: | |
---|---|---|---|
Priority: | Unknown | Milestone: | |
Module: | Core | Keywords: | |
Cc: | sebastian, trev | Blocked By: | |
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | no | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description
Background
In issue #3056 we diagnosed and worked around an issue that was causing occasional long pauses when responding to web requests. We did this by enabling threading support, so that the "stalled" connections didn't block future connections or requests.
We have noticed a similar issue with the adblockpluscore run_tests.py script that we use to run a local webserver to serve the JavaScript test suite for the repository.
What to change
Enable threading for the Flask server in adblockpluscore/run_tests.py. Make sure to set the daemon_threads attribute to True so that the process can be killed instantly.
Hints for testers
- First reproduce the issue reliably, using the existing test case as a starting point.
- Then apply the fix, ensure the issue no longer occurs. (You will to re-start the server of course.)
- Make sure the server can be killed with a keyboard interrupt instantly. (When you press Control C at the command line the server should not wait several seconds before exiting.)
https://hg.adblockplus.org/adblockpluscore/rev/cbbe5cf2db7b