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.
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.