-
-
Notifications
You must be signed in to change notification settings - Fork 485
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
Sentry reports exception already caught by assert_raises #2277
Comments
this is because we patch active job and thus the sentry stuff runs before your sentry-ruby/sentry-rails/lib/sentry/rails/active_job.rb Lines 4 to 12 in 100caa0
You can manually set edit: nvm sorry didn't read that you still want to send uncaught exceptions in tests. Then your next best way is to use |
Thank you a lot for clarifying this! |
I do not understand why my test cases following this pattern send exceptions to sentry. The
assert_raises
statement rescues the exception and does not reraise it. How can it still slip through and be reported to the sentry server? And what do I need to change to a) prevent these job tests to send report exception correctly caught by the assert_raises helper, and b) still report uncaught exceptions in the test environment?I can't imagine that this happens because I have configured GoodJob which is not supported by this gem because the tests use the test adapter anyway.
Any guidance with this would be greatly appreciated.
The text was updated successfully, but these errors were encountered: