diff --git a/spec/datadog/profiling/component_spec.rb b/spec/datadog/profiling/component_spec.rb index 9389625436b..83b11f0c7ed 100644 --- a/spec/datadog/profiling/component_spec.rb +++ b/spec/datadog/profiling/component_spec.rb @@ -592,7 +592,11 @@ end context "when GVL profiling is requested" do - before { settings.profiling.advanced.preview_gvl_enabled = true } + before do + settings.profiling.advanced.preview_gvl_enabled = true + # This triggers a warning in some Rubies so it's easier for testing to disable it + settings.profiling.advanced.gc_enabled = false + end context "on Ruby < 3.3" do before { skip "Behavior does not apply to current Ruby version" if RUBY_VERSION >= "3.3." }