Skip to content

Question: does the test suite need to create, start and stop Rumbster each time? #32

@guyboertje

Description

@guyboertje

Does the current impl impact test suite performance?

Consider using a suite wide set for Rumbster and simply clear the messages from the MailMessageObserver instance before each test.

e.g.

def message_observer
  @observer ||= MailMessageObserver.new
end

def rumpster
  @rumpster ||= begin
    inst = Rumbster.new(port)
    inst.add_observer message_observer
    inst.start
    inst
  end
end

describe "outputs/email" do

  let(:plugin)            { LogStash::Plugin.lookup("output", "email") }

  before :each do
    message_observer.messages.clear
  end

  after :suite do
    rumpster.stop
  end

  # rest of tests here

end

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions