Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failing spec under logstash 2.x #89

Closed
jsvd opened this issue Dec 23, 2015 · 7 comments
Closed

failing spec under logstash 2.x #89

jsvd opened this issue Dec 23, 2015 · 7 comments
Labels

Comments

@jsvd
Copy link
Member

jsvd commented Dec 23, 2015

projects/logstash (git)-[2.2] % bin/rspec ./vendor/bundle/jruby/1.9/gems/logstash-input-file-2.0.3/spec/inputs/file_spec.rb:235 
Using Accessor#strict_set for specs
Run options:
  include {:locations=>{"./vendor/bundle/jruby/1.9/gems/logstash-input-file-2.0.3/spec/inputs/file_spec.rb"=>[235]}}
  exclude {:redis=>true, :socket=>true, :performance=>true, :couchdb=>true, :elasticsearch=>true, :elasticsearch_secure=>true, :export_cypher=>true, :integration=>true, :windows=>true}
F

Failures:

  1) LogStash::Inputs::File when wildcard path and a multiline codec is specified collects separate multiple line events from each file
     Failure/Error: expect(events.size).to eq(event_count)

       expected: 2
            got: 0

       (compared using ==)
     # ./vendor/bundle/jruby/1.9/gems/logstash-input-file-2.0.3/spec/inputs/file_spec.rb:242:in `(root)'
     # ./vendor/bundle/jruby/1.9/gems/rspec-wait-0.0.8/lib/rspec/wait.rb:46:in `(root)'
     # ./lib/bootstrap/rspec.rb:11:in `(root)'

Finished in 1.25 seconds (files took 0.993 seconds to load)
1 example, 1 failure

Failed examples:

rspec ./vendor/bundle/jruby/1.9/gems/logstash-input-file-2.0.3/spec/inputs/file_spec.rb:235 # LogStash::Inputs::File when wildcard path and a multiline codec is specified collects separate multiple line events from each file

Randomized with seed 23564
@jsvd jsvd added the bug label Dec 23, 2015
@guyboertje
Copy link
Contributor

There are various sleeps throughout the code which make the rspec thread wait until the runner thread has had a chance to do its thing. The amount of time it waits for is OK on my MPB with SSD but I suspect that a loaded CI server might need longer sleeps.

I am fixing that now. The fix may need back porting.

@ph
Copy link
Contributor

ph commented Dec 23, 2015

@guyboertje can we rewrite the case with rspec-wait this will try multiple times before failing?

@guyboertje
Copy link
Contributor

@ph - I tried with rspec-wait but it did not work. Trying something of my own creation.

Unfortunately there is one situation where we expect nothing to happen and we can't put in a wait for that 😄

@ph
Copy link
Contributor

ph commented Dec 23, 2015

we also have try {} in devutils, which is a bit different from rspec-wait. It might work in your case.

@jsvd
Copy link
Member Author

jsvd commented Dec 23, 2015

what is strange is that using logstash master I don't get the same error. could be a result of poor case analysis on my part though.

@guyboertje
Copy link
Contributor

@jsvd @ph - yes, I asked myself the same, why master is OK and branch is not.

@suyograo
Copy link
Contributor

guyboertje added a commit to guyboertje/logstash-input-file that referenced this issue Dec 29, 2015
begin to add ignore_after config option
depends on filewatch 0.6.8

add timed_out method to TailListener and specs

revert Gemfile changes for PR

split and rename ignore_after option, update gem deps to published ver.

bump ver, make suggested review changes and improve spec reliability

update changelog

Fixes logstash-plugins#81, Fixes logstash-plugins#89, Fixes logstash-plugins#90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants