You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a --force-browser-process-termination flag to the test runner (#25512)
A major headache when working with the browser test runs in both the
single-threaded and parallel harness on the CI are stray browser
processes that stay alive across browser test runs.
This happens with Safari, and also with Firefox browser, on each of
Windows, Linux and macOS systems.
It is easy to get especially MacOS systems to hang so that one cannot
even remote-desktop in to the CI hardware anymore, since all system
resources are taken up by the runaway browser processes.
One might argue that these are just "bugs", and after we fix those one
by one, we would have a working test harness where browser processes are
cleanly shut down so that stray browser processes would not remain.
That might be the case, though we need a system that is robust to these
types of bugs.
To help this, add a failsafe mechanism in the form of a new
`--force-browser-process-termination` flag to the test runner, to help
tear down browser processes before and after a test suite run. This way
even if the harness is misbehaving, there will be a backstop that
aggressively attempts to clean up all browsers between test runs.
This way I can have the CI tasks force-shutdown all runners between
suite runs, to ensure that even if things are still not working 100%, I
will not need to go and physically keep pressing the power button on my
Mac Minis to boot them back up.
parser.add_argument('--force-browser-process-termination', action='store_true', help='If true, a fail-safe method is used to ensure that all browser processes are terminated before and after the test suite run. Note that this option will terminate all browser processes, not just those launched by the harness, so will result in loss of all open browsing sessions.')
0 commit comments