alphagov / whitehall

Publishes government content on GOV.UK
https://docs.publishing.service.gov.uk/apps/whitehall.html
MIT License
896 stars 194 forks source link

Fix flaky Sentry tests #9409

Closed pezholio closed 2 months ago

pezholio commented 2 months ago

The Sentry test introduced in https://github.com/alphagov/whitehall/pull/9405 appears to be a bit flaky, failing in some circumstances. This changes the test to a functional test (which is a better fit) and catches the error directly, and this seems to fix the issue.

I'm not entirely sure why this works now, but I've re-ran the suite a number of times, and haven't experienced an issue, whereas before we were experiencing failures at least one time out of every 2-3, so I'm confident this will unblock CI.