mirror of
https://git.yoctoproject.org/poky
synced 2026-04-04 05:02:21 +02:00
bitbake: toaster/tests: fix chrome argument syntax and wait for driver exit
The chrome driver sometimes fails with a page crash for a full suite of tests, pointing to a failure in the setup of the driver due to resource limitations. To mitigate these crashes, add a wait between driver driven tests to ensure resources are freed. (Bitbake rev: 8f998e27aae694c16f788aac12558621089d0839) Signed-off-by: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
e63d6cb38e
commit
0fd93b86c4
@@ -36,7 +36,7 @@ def create_selenium_driver(cls,browser='chrome'):
|
||||
|
||||
if browser == 'chrome':
|
||||
options = webdriver.ChromeOptions()
|
||||
options.add_argument('headless')
|
||||
options.add_argument('--headless')
|
||||
options.add_argument('--disable-infobars')
|
||||
options.add_argument('--disable-dev-shm-usage')
|
||||
options.add_argument('--no-sandbox')
|
||||
@@ -166,6 +166,8 @@ class SeleniumTestCaseBase(unittest.TestCase):
|
||||
""" Clean up webdriver driver """
|
||||
|
||||
cls.driver.quit()
|
||||
# Allow driver resources to be properly freed before proceeding with further tests
|
||||
time.sleep(5)
|
||||
super(SeleniumTestCaseBase, cls).tearDownClass()
|
||||
|
||||
def get(self, url):
|
||||
|
||||
Reference in New Issue
Block a user