diff --git a/logstash-core/spec/logstash/pipeline_spec.rb b/logstash-core/spec/logstash/pipeline_spec.rb index 8d3212ae9f4..d4dc0fe9840 100644 --- a/logstash-core/spec/logstash/pipeline_spec.rb +++ b/logstash-core/spec/logstash/pipeline_spec.rb @@ -120,7 +120,7 @@ class TestPipeline < LogStash::Pipeline let(:override_thread_count) { 42 } let(:dead_letter_queue_enabled) { false } let(:dead_letter_queue_path) { } - let(:pipeline_settings_obj) { LogStash::SETTINGS } + let(:pipeline_settings_obj) { LogStash::SETTINGS.clone } let(:pipeline_settings) { {} } let(:max_retry) {10} #times let(:timeout) {120} #seconds @@ -136,10 +136,6 @@ class TestPipeline < LogStash::Pipeline pipeline_settings.each {|k, v| pipeline_settings_obj.set(k, v) } end - after :each do - pipeline_settings_obj.reset - end - describe "#ephemeral_id" do it "creates an ephemeral_id at creation time" do pipeline = mock_pipeline_from_string("input { generator { count => 1 } } output { null {} }") diff --git a/logstash-core/spec/logstash/runner_spec.rb b/logstash-core/spec/logstash/runner_spec.rb index df3ed1e3b6c..15c43b0bd4c 100644 --- a/logstash-core/spec/logstash/runner_spec.rb +++ b/logstash-core/spec/logstash/runner_spec.rb @@ -294,6 +294,9 @@ end describe "config.debug" do + after(:each) do + LogStash::SETTINGS.set("config.debug", false) + end it "should set 'config.debug' to false by default" do expect(LogStash::Agent).to receive(:new) do |settings| expect(settings.get("config.debug")).to eq(false)