[openstreetmap/openstreetmap-website] System test for language selector is flaky (Issue #6712)

Andy Allan notifications at github.com
Wed Jan 21 17:50:21 UTC 2026


gravitystorm left a comment (openstreetmap/openstreetmap-website#6712)

So my usual approach to these issues is to avoid any sleep statements whatsoever. If there's a synchronisation issue, sleeps just mask the actual problem, which is waiting for completion rather than waiting a fixed amount of time. I always find that there's some combination of laptop or CI busyness, that will find a way to occasionally take slightly longer than whatever sleep delay is set! I also find that as soon as `sleep` in tests becomes acceptable, they multiple like rabbits.

My other usual approach is to lean heavily on the built-in waiting that comes for free with most capybara/selenium commands. So things like `visit "foo"; assert_content "bar"` don't normally fail, even if the page load takes 500ms, because assert_content will intelligently wait. This means that if I reviewed the current code, my first instinct would be the exact opposite of https://github.com/openstreetmap/openstreetmap-website/pull/6589 🤔 

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6712#issuecomment-3780090265
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/6712/3780090265 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260121/bb121a0b/attachment.htm>


More information about the rails-dev mailing list