Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix selenium crash #19

Merged
merged 2 commits into from
Aug 14, 2024
Merged

Fix selenium crash #19

merged 2 commits into from
Aug 14, 2024

Conversation

antonag32
Copy link
Contributor

I was trying to run selenium tests on an Odoo 16 local development instance and selenium would always crash with the following message:

selenium.common.exceptions.WebDriverException: Message: tab crashed

After investigating I was able to track it down to the resource limits that were being used. After setting them to infinity as Odoo does, selenium tests work fine again. Setting them to infinity may look scary but I think that is actually the default value for processes, at least on my machine, also tests are not being run in production to resource limits would not change there.

The exit code from tests was being masked by the exit codes reported
when generating coverage reports which meant that even if tests failed,
as long as coverage report generation was succesful, the job would not
fail.

Therefore the exit code for tests is now stored and used.
With previous resource limits Selenium tests would crash with a "window
tab crashed" error message. The new limits match Odoo's limits used for
testing[1] and fix said issue.

[1] https://github.com/Vauxoo/odoo/blob/9d51fa9d/odoo/tests/common.py#L1003
@antonag32
Copy link
Contributor Author

Can you review @moylop260? Also I think the CI is running with the target branch instead of code on my branch (due to pull_request_target in github's ci config) but you can check the CI on my fork to verify Selenium is no longer crashing (as it is in the current PR jobs).

https://github.com/antonag32/odoo-selenium/actions

@moylop260 moylop260 merged commit 2eb8d1e into Vauxoo:main Aug 14, 2024
5 checks passed
@moylop260 moylop260 deleted the fix-selenium-crash branch August 14, 2024 00:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants