spec/inputs/file_spec.rb in logstash-input-file-2.2.1 vs spec/inputs/file_spec.rb in logstash-input-file-2.2.2

- old
+ new

@@ -179,18 +179,14 @@ RSpec::Sequencing .run_after(0.1, "assert zero events then append two lines") do expect(events.size).to eq(0) File.open(tmpfile_path, "a") { |fd| fd.puts("hello"); fd.puts("world") } end - .then_after(0.1, "only one event is created, the last line is buffered") do - expect(events.size).to eq(1) - end - .then_after(0.1, "quit") do + .then_after(0.25, "quit") do subject.stop end + subject.run(events) - # stop flushes the second event - expect(events.size).to eq(2) event1 = events[0] expect(event1).not_to be_nil expect(event1["path"]).to eq tmpfile_path expect(event1["@metadata"]["path"]).to eq tmpfile_path