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

Investigate the spurious testing suite #622

Open
jb3 opened this issue Mar 17, 2025 · 0 comments
Open

Investigate the spurious testing suite #622

jb3 opened this issue Mar 17, 2025 · 0 comments

Comments

@jb3
Copy link
Member

jb3 commented Mar 17, 2025

As of recent, the testing seems more spurious than ever, with errors that now appear to be persistent cropping up despite no changes to dependencies or anything in the test suites taking place.

=========================== short test summary info ============================
FAILED assets/tests/test_interaction.py::test_search - selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: stale element not found
[...]
FAILED assets/tests/test_interaction.py::TestAssetList::test_asset_order - selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: stale element not found
[...]
FAILED assets/tests/test_interaction.py::TestSupplierList::test_search - AssertionError: False is not true
FAILED users/tests/test_users.py::UserRegistrationTest::test_registration - selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: stale element not found
[...]
FAILED RIGS/tests/test_interaction.py::TestCalendar::test_ics_files - django.db.utils.OperationalError: database table is locked
====== 5 failed, 120 passed, 3 skipped, 310 warnings in 161.25s (0:02:41) ======

I am unsure why these 5 tests seem to stay stuck as failed, especially when nothing has been touched related to them. One thing they appear to have in common is that for a few of them a page-reload/DOM change happens (which obviously triggers the error there) but I am unsure why that is now posing an issue/what the best way to mitigate this is (fetch certain items from the DOM again).

An example build log with these failures is located here: https://github.com/nottinghamtec/PyRIGS/actions/runs/13888840157/job/38859139876

The test_search function may have something deeper broken since it is not a stale error but I suspect it is related to some sort of delay. Similarly, the ICS test is failing due to the SQLite database being locked, I am not sure of the best way to mitigate that (test against PostgreSQL? 🤣 1).

Footnotes

  1. Only half joking... we do this for python-discord/site, another Django project I maintain, and the tests are completely reproducible.

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

No branches or pull requests

1 participant