Closed ixti closed 3 months ago
Merging #2275 (ebf04a4) into master (ffffce9) will decrease coverage by
0.05%
. The diff coverage is100.00%
.:exclamation: Current head ebf04a4 differs from pull request most recent head a573841. Consider uploading reports for the commit a573841 to get more accurate results
Thanks for the PR, but why did you find it necessary to freeze the enabled_environments
array in the first place?
My tests were randomly passing randomly failing. Adding a freeze helped to nail down that Sentry helper was changing configuration inplace - thus specs became order-dependent
superseded by #2317
I still think |=
better reflects the desire than +=
:D
didn’t work for me :(
didn’t work for me :(
Oh. That's weird. Either way, as long as Sentry does not mutate original config - we're good :D
:heart: :heart: :heart:
Ensure enabled_environments contains test environment without mutating original list. Otherwise it can cause unexpected spec failures in case original config has unfrozen Array, or fail in attempt to mutate said array.
Alternative approach would be to override
Sentry::Configuration#dup
to dup underlying arrays and hashes.See: https://github.com/getsentry/sentry-ruby/pull/2269#issuecomment-2002637738