-
- Downloads
Fix flaky restrict_gitlab_schema_spec.rb
This test was failing because `Feature.enabled?(:redis_hll_tracking)` was called in the migration and expecting the `feature_names` database table to be accessed. However, it wasn't accessed for two reasons: 1. In tests we stub out feature flag access and use an in-memory cache. However, even though the test had `stub_feature_flags: false` set in the metadata, a stale `Feature` was still memoized and had to be cleared out. 2. With the feature flag stubs disabled, this enabled the Redis cache for feature flags. We need to clear this out between tests to ensure the database is hit. Relates to https://gitlab.com/gitlab-org/gitlab/-/issues/416143
Please register or sign in to comment