Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add flipper/test_help to automatically configure Flipper in tests/specs. #808
Add flipper/test_help to automatically configure Flipper in tests/specs. #808
Changes from 1 commit
2672714
f76d663
f5e26fb
32b3928
f3620af
414579e
a7d9266
903b9a5
05e2ce0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got some spec failures after this - you get a new flipper instance but using the same memory adapter, so there's leakage between tests.
I can make everything green again if I add
Flipper.instance.import(Flipper::Adapters::Memory.new)
to the reset (which was the simplest way I could find to delete all the data from the shared adapter)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I hit the same. Maybe it would be better to just disable all feature flags inAh no, for me it just doesn't work in system specs with the memory adapter. The feature flag just doesn't get set.reset
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I hit this. The app thread and spec thread end up using a different flipper instance (fine). The app thread is running for the entire duration of the specs so keeps the same flipper instance.
On the second spec the before each creates a new flipper instance but this only affects the spec thread, the app thread still has the old memory adapter.
To make this work I had to disable the builtin flipper/test_help (with the env var) and then do what I was doing before: create the shared memory adapter once in before(suite) and clear out its contents in before each