Sha256: 2b60b175ceb232d01f5e90915c4a6684cfb0d31b41051e832f0932293ae24ef2

Contents?: true

Size: 741 Bytes

Versions: 11

Compression:

Stored size: 741 Bytes

Contents

# encoding: utf-8
require "spec_helper"
require "logstash/util/worker_threads_default_printer"

describe LogStash::Util::WorkerThreadsDefaultPrinter do
  let(:settings) { {} }
  let(:collector) { [] }

  subject { described_class.new(settings) }

  context 'when the settings hash is empty' do
    it 'the #visit method returns a string with 1 filter worker' do
      subject.visit(collector)
      expect(collector.first).to eq("Filter workers: 1")
    end
  end

  context 'when the settings hash has content' do
    let(:settings) { {'filter-workers' => 42} }

    it 'the #visit method returns a string with 42 filter workers' do
      subject.visit(collector)
      expect(collector.first).to eq("Filter workers: 42")
    end
  end
end

Version data entries

11 entries across 10 versions & 2 rubygems

Version Path
logstash-input-beats-2.0.2 vendor/jruby/1.9/gems/logstash-core-2.0.1-java/spec/util/worker_threads_default_printer_spec.rb
logstash-input-beats-2.0.2 vendor/jruby/1.9/gems/logstash-core-2.0.0-java/spec/util/worker_threads_default_printer_spec.rb
logstash-core-2.0.1-java spec/util/worker_threads_default_printer_spec.rb
logstash-core-2.1.0.snapshot1-java spec/util/worker_threads_default_printer_spec.rb
logstash-core-2.0.1.snapshot1-java spec/util/worker_threads_default_printer_spec.rb
logstash-core-2.0.0-java spec/util/worker_threads_default_printer_spec.rb
logstash-core-2.0.0.rc1-java spec/util/worker_threads_default_printer_spec.rb
logstash-input-beats-0.9.2 vendor/jruby/1.9/gems/logstash-core-2.0.0.beta3-java/spec/util/worker_threads_default_printer_spec.rb
logstash-input-beats-0.9.1 vendor/jruby/1.9/gems/logstash-core-2.0.0.beta3-java/spec/util/worker_threads_default_printer_spec.rb
logstash-core-2.0.0.beta3-java spec/util/worker_threads_default_printer_spec.rb
logstash-core-2.0.0.beta2-java spec/util/worker_threads_default_printer_spec.rb