[openstreetmap/openstreetmap-website] Attempt to make timeouts work properly (24f5795)

Andy Allan notifications at github.com
Wed Jan 31 14:20:41 UTC 2024


> Well if I knew what the problem was then I would have done so!

Reading between the lines, I guess there's some problem in production then? Like long-running queries not being timed out properly?

> you can't just make a query go slowly

I'd look into stubbing out the query, perhaps with Minitest::Mock, so that you can control precisely how long the 'query' takes to run in the test suite. That could be enough to fire the timeouts and check that the exceptions are being handled. Of course, there's probably some complexity about what part exactly to mock in order to trigger the problem that you are seeing.

If it's something that needs super-in-depth debugging to isolate the problem, then we need to figure out how to write the tests to either prevent it from cropping up again in production in future, or to isolate whatever is making it flakey and report it upstream!

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/commit/24f579562fbaf1ec9138014b0f2ed8e219eb75f7#commitcomment-138120916
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/commit/24f579562fbaf1ec9138014b0f2ed8e219eb75f7/138120916 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20240131/1e58514f/attachment.htm>


More information about the rails-dev mailing list