Skip to content
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

frontend: Do not handle panics when running "go test" #1333

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

mbarnes
Copy link
Collaborator

@mbarnes mbarnes commented Feb 15, 2025

What this PR does

This effectively disables MiddlewarePanic when running unit tests.

Catching a panic can sometimes obscure the root cause of a test failure, especially when the panic is intermittent and happens during a CI pipeline run where there's no opportunity to debug.

This has been observed at least once before in PR #833 and may be happening again according to issue #1163.

This effectively disables MiddlewarePanic when running unit tests.

Catching a panic can sometimes obscure the root cause of a test
failure, especially when the panic is intermittent and happens
during a CI pipeline run where there's no opportunity to debug.

This has been observed at least once before in
#833

and may be happening again according to
#1163
@mbarnes mbarnes force-pushed the let-unit-tests-panic branch from ae0b23f to 0cab644 Compare February 17, 2025 13:05
}
}()
// Do not catch panics when running "go test".
if !testing.Testing() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will ensure only for non testing envs .

@mbarnes mbarnes merged commit aa7fc49 into main Feb 17, 2025
19 of 21 checks passed
@mbarnes mbarnes deleted the let-unit-tests-panic branch February 17, 2025 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants