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

Test failling LogStash::Instrument::PeriodicPoller::JVM load average on linux when an exception occur reading the file doesn't raise an exception #6354

Closed
ph opened this issue Dec 5, 2016 · 2 comments
Assignees

Comments

@ph
Copy link
Contributor

ph commented Dec 5, 2016

  1) LogStash::Instrument::PeriodicPoller::JVM load average on linux when an exception occur reading the file doesn't raise an exception
     Failure/Error: expect(::File).to receive(:read).with("/proc/loadavg").and_raise("Didnt work out so well")
       (<File (class)>).read("/proc/loadavg")
           expected: 1 time with arguments: ("/proc/loadavg")
           received: 2 times with arguments: ("/proc/loadavg")
     # /var/lib/jenkins/workspace/elastic+logstash+5.1+multijob-os-compatibility/os/opensuse/logstash-core/spec/logstash/instrument/periodic_poller/jvm_spec.rb:47:in `(root)'
     # /var/lib/jenkins/workspace/elastic+logstash+5.1+multijob-os-compatibility/os/opensuse/vendor/bundle/jruby/1.9/gems/rspec-wait-0.0.9/lib/rspec/wait.rb:46:in `(root)'
     # /var/lib/jenkins/workspace/elastic+logstash+5.1+multijob-os-compatibility/os/opensuse/rakelib/test.rake:49:in `(root)'
     # /var/lib/jenkins/workspace/elastic+logstash+5.1+multijob-os-compatibility/os/opensuse/vendor/bundle/jruby/1.9/gems/rake-11.3.0/lib/rake/task.rb:248:in `execute'
     # /var/lib/jenkins/workspace/elastic+logstash+5.1+multijob-os-compatibility/os/opensuse/vendor/bundle/jruby/1.9/gems/rake-11.3.0/lib/rake/task.rb:243:in `execute'
     # /var/lib/jenkins/workspace/elastic+logstash+5.1+multijob-os-compatibility/os/opensuse/vendor/bundle/jruby/1.9/gems/rake-11.3.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
     # /var/lib/jenkins/workspace/elastic+logstash+5.1+multijob-os-compatibility/os/opensuse/vendor/bundle/jruby/1.9/gems/rake-11.3.0/lib/rake/task.rb:180:in `invoke_with_call_chain'
     # /var/lib/jenkins/workspace/elastic+logstash+5.1+multijob-os-compatibility/os/opensuse/vendor/bundle/jruby/1.9/gems/rake-11.3.0/lib/rake/task.rb:173:in `invoke'
     # /var/lib/jenkins/workspace/elastic+logstash+5.1+multijob-os-compatibility/os/opensuse/vendor/bundle/jruby/1.9/gems/rake-11.3.0/lib/rake/application.rb:152:in `invoke_task'
     # /var/lib/jenkins/workspace/elastic+logstash+5.1+multijob-os-compatibility/os/opensuse/vendor/bundle/jruby/1.9/gems/rake-11.3.0/lib/rake/application.rb:108:in `top_level'
     # /var/lib/jenkins/workspace/elastic+logstash+5.1+multijob-os-compatibility/os/opensuse/vendor/bundle/jruby/1.9/gems/rake-11.3.0/lib/rake/application.rb:108:in `top_level'
     # /var/lib/jenkins/workspace/elastic+logstash+5.1+multijob-os-compatibility/os/opensuse/vendor/bundle/jruby/1.9/gems/rake-11.3.0/lib/rake/application.rb:117:in `run_with_threads'
     # /var/lib/jenkins/workspace/elastic+logstash+5.1+multijob-os-compatibility/os/opensuse/vendor/bundle/jruby/1.9/gems/rake-11.3.0/lib/rake/application.rb:102:in `top_level'
     # /var/lib/jenkins/workspace/elastic+logstash+5.1+multijob-os-compatibility/os/opensuse/vendor/bundle/jruby/1.9/gems/rake-11.3.0/lib/rake/application.rb:80:in `run'
     # /var/lib/jenkins/workspace/elastic+logstash+5.1+multijob-os-compatibility/os/opensuse/vendor/bundle/jruby/1.9/gems/rake-11.3.0/lib/rake/application.rb:178:in `standard_exception_handling'
     # /var/lib/jenkins/workspace/elastic+logstash+5.1+multijob-os-compatibility/os/opensuse/vendor/bundle/jruby/1.9/gems/rake-11.3.0/lib/rake/application.rb:77:in `run'
     # /var/lib/jenkins/workspace/elastic+logstash+5.1+multijob-os-compatibility/os/opensuse/vendor/bundle/jruby/1.9/gems/rake-11.3.0/exe/rake:27:in `(root)'

Finished in 2 minutes 37.4 seconds (files took 5.29 seconds to load)
2228 examples, 1 failure

Failed examples:

rspec /var/lib/jenkins/workspace/elastic+logstash+5.1+multijob-os-compatibility/os/opensuse/logstash-core/spec/logstash/instrument/periodic_poller/jvm_spec.rb:50 # LogStash::Instrument::PeriodicPoller::JVM load average on linux when an exception occur reading the file doesn't raise an exception

Randomized with seed 1024
@ph ph added the test failure label Dec 5, 2016
@ph ph self-assigned this Dec 5, 2016
@ph
Copy link
Contributor Author

ph commented Dec 7, 2016

I've tried reproducing it on linux and mac without luck so far with and without the same seed. I believe its not related to the order of execution of the tests. The other thing is maybe we have another thread in the background trying to get metric.

maybe we should stop collecting metric when we run the tests scenario and only do it when required. This is also another argument to refactor the metric collection so they don't mix with the actual logic of the classes.

@ph
Copy link
Contributor Author

ph commented Apr 20, 2017

I have fixed it in #6886

@ph ph closed this as completed Apr 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant