Opened 4 years ago

Closed 4 years ago

#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):

https://codereview.adblockplus.org/29328211/

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.)

Change History (2)

comment:1 Changed 4 years ago by kzar

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed 4 years ago by kzar

  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.