From: alexander.lussier-cullen@savoirfairelinux.com
To: toaster@lists.yoctoproject.org
Cc: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com>
Subject: [Toaster] toaster: fix chrome argument syntax and wait for driver exit
Date: Thu, 14 Dec 2023 16:05:35 -0500 [thread overview]
Message-ID: <20231214210535.787180-1-alexander.lussier-cullen@savoirfairelinux.com> (raw)
From: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com>
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.
Signed-off-by: Alexander Lussier-Cullen <alexander.lussier-cullen@savoirfairelinux.com>
---
bitbake/lib/toaster/tests/browser/selenium_helpers_base.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py b/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
index 46ced5a167..2c8a778f79 100644
--- a/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
+++ b/bitbake/lib/toaster/tests/browser/selenium_helpers_base.py
@@ -35,7 +35,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')
@@ -164,6 +164,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):
--
2.34.1
reply other threads:[~2023-12-14 21:06 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231214210535.787180-1-alexander.lussier-cullen@savoirfairelinux.com \
--to=alexander.lussier-cullen@savoirfairelinux.com \
--cc=toaster@lists.yoctoproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).