From b38a3cc97cae9fb2c1bc189235a83545e5ec720d Mon Sep 17 00:00:00 2001 From: Safihre Date: Tue, 5 May 2020 10:22:48 +0200 Subject: [PATCH] Add extra command line parameter to improve Selenium stability --- tests/testhelper.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/testhelper.py b/tests/testhelper.py index daa1298..e0d1467 100644 --- a/tests/testhelper.py +++ b/tests/testhelper.py @@ -20,6 +20,7 @@ tests.testhelper - Basic helper functions """ import os +import sys import time import unittest from http.client import RemoteDisconnected @@ -123,6 +124,9 @@ class SABnzbdBaseTest(unittest.TestCase): if "CI" in os.environ: driver_options.add_argument("--headless") driver_options.add_argument("--no-sandbox") + # Needed for stability on Linux, doesn't work on Windows + if not sys.platform.startswith("win"): + driver_options.add_argument("--single-process") cls.driver = webdriver.Chrome(options=driver_options) # Get the newsserver-info, if available