You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to pass an UnleashContext to FakeUnleash.enable(), so that it matches Unleash.isEnabled()
Background
You have the FakeUnleash for unit testing, which is great. However, for things like dependency injection, and per your documentation, you will often end up with a singleton instance of FakeUnleash. Especially when you are re-using the spring context between tests. If the tests are single-threaded, this fine, as you can mutate global state without fear of interaction. However, with concurrent tests, mutating global state like this can lead to incorrect interactions.
Solution suggestions
Make FakeUnleash track and use UnleashContext so that FakeUnleash.enable() matches Unleash.isEnabled()
The text was updated successfully, but these errors were encountered:
Describe the feature request
I would like to be able to pass an
UnleashContext
toFakeUnleash.enable()
, so that it matchesUnleash.isEnabled()
Background
You have the FakeUnleash for unit testing, which is great. However, for things like dependency injection, and per your documentation, you will often end up with a singleton instance of FakeUnleash. Especially when you are re-using the spring context between tests. If the tests are single-threaded, this fine, as you can mutate global state without fear of interaction. However, with concurrent tests, mutating global state like this can lead to incorrect interactions.
Solution suggestions
Make
FakeUnleash
track and useUnleashContext
so thatFakeUnleash.enable()
matchesUnleash.isEnabled()
The text was updated successfully, but these errors were encountered: