Improve reliability and use of feature flag testing.
Review Request #11054 — Created June 24, 2020 and submitted
properly cleaning up after a crash or assertion, causing a feature flag
to stay to stay modified after use, potentially disrupting other tests.
This change fixes that by ensuring we clear the state in a
It also improves these methods by allowing a
Featureinstance to be
passed instead of just its ID, which simplifies usage.
Unit tests pass.