diff options
Diffstat (limited to 'spec/support/gitlab_experiment.rb')
-rw-r--r-- | spec/support/gitlab_experiment.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/support/gitlab_experiment.rb b/spec/support/gitlab_experiment.rb index 1f283e4f06c..45f733201e2 100644 --- a/spec/support/gitlab_experiment.rb +++ b/spec/support/gitlab_experiment.rb @@ -1,4 +1,13 @@ # frozen_string_literal: true +# This is a temporary fix until we have a larger discussion around the +# challenges raised in https://gitlab.com/gitlab-org/gitlab/-/issues/300104 +class ApplicationExperiment < Gitlab::Experiment # rubocop:disable Gitlab/NamespacedClass + def initialize(*args) + super + Feature.persist_used!(name) + end +end + # Disable all caching for experiments in tests. Gitlab::Experiment::Configuration.cache = nil |