datamapper / do

DataObjects
147 stars 74 forks source link

"DataObjects::Mysql::Command [...] in parallel should finish within 2 seconds" test failing on Debian FreeBSD/Hurd #33

Open boutil opened 12 years ago

boutil commented 12 years ago

Hi!

Datamapper tests are enabled when building datamapper-mysql packages for Debian. They pass perfectly, except on the Freebsd and Hurd architecture, when one test fails: The trace below is for Freebsd. The same test fails with Hurd (The number there is slightly above 4 seconds).

I see in the source that this particular test is marked as pending for Windows. Maybe it needs to be marked as pending for a larger class of OS containing also Freebsd and Hurd?

1) DataObjects::Mysql::Command it should behave like a Command with async running queries in parallel should finish within 2 seconds
     Failure/Error: Unable to find matching line from backtrace
       expected: < 2
            got:   2.008432
     Shared Example Group: "a Command with async" called from 
     # /usr/lib/ruby/vendor_ruby/rspec/expectations/fail_with.rb:32:in `fail_with'
     # /usr/lib/ruby/vendor_ruby/rspec/matchers/operator_matcher.rb:47:in `fail_with_message'
     # /usr/lib/ruby/vendor_ruby/rspec/matchers/operator_matcher.rb:71:in `__delegate_operator'
     # /usr/lib/ruby/vendor_ruby/rspec/matchers/operator_matcher.rb:59:in `eval_match'
     # /usr/lib/ruby/vendor_ruby/rspec/matchers/operator_matcher.rb:28:in `<'
     # /usr/lib/ruby/vendor_ruby/data_objects/spec/shared/command_spec.rb:228
     # /usr/lib/ruby/vendor_ruby/data_objects/spec/lib/pending_helpers.rb:7:in `pending_if'
     # /usr/lib/ruby/vendor_ruby/data_objects/spec/shared/command_spec.rb:227
     # /usr/lib/ruby/vendor_ruby/rspec/core/example.rb:80:in `instance_eval'
     # /usr/lib/ruby/vendor_ruby/rspec/core/example.rb:80:in `run'
     # /usr/lib/ruby/vendor_ruby/rspec/core/example.rb:173:in `with_around_hooks'
     # /usr/lib/ruby/vendor_ruby/rspec/core/example.rb:77:in `run'
     # /usr/lib/ruby/vendor_ruby/rspec/core/example_group.rb:355:in `run_examples'
     # /usr/lib/ruby/vendor_ruby/rspec/core/example_group.rb:351:in `map'
     # /usr/lib/ruby/vendor_ruby/rspec/core/example_group.rb:351:in `run_examples'
     # /usr/lib/ruby/vendor_ruby/rspec/core/example_group.rb:337:in `run'
     # /usr/lib/ruby/vendor_ruby/rspec/core/example_group.rb:338:in `run'
     # /usr/lib/ruby/vendor_ruby/rspec/core/example_group.rb:338:in `map'
     # /usr/lib/ruby/vendor_ruby/rspec/core/example_group.rb:338:in `run'
     # /usr/lib/ruby/vendor_ruby/rspec/core/example_group.rb:338:in `run'
     # /usr/lib/ruby/vendor_ruby/rspec/core/example_group.rb:338:in `map'
     # /usr/lib/ruby/vendor_ruby/rspec/core/example_group.rb:338:in `run'
     # /usr/lib/ruby/vendor_ruby/rspec/core/command_line.rb:28:in `run'
     # /usr/lib/ruby/vendor_ruby/rspec/core/command_line.rb:28:in `map'
     # /usr/lib/ruby/vendor_ruby/rspec/core/command_line.rb:28:in `run'
     # /usr/lib/ruby/vendor_ruby/rspec/core/reporter.rb:34:in `report'
     # /usr/lib/ruby/vendor_ruby/rspec/core/command_line.rb:25:in `run'
     # /usr/lib/ruby/vendor_ruby/rspec/core/runner.rb:80:in `run_in_process'
     # /usr/lib/ruby/vendor_ruby/rspec/core/runner.rb:69:in `run'
     # /usr/lib/ruby/vendor_ruby/rspec/core/runner.rb:10:in `autorun'
     # /usr/bin/rspec:4

Finished in 4.89 seconds
71 examples, 1 failure

Thanks,

Cédric

dbussink commented 12 years ago

This probably indicates that the underlying Ruby VM can't properly run multiple i/o requests in parallel. The problem is that I have no access to those platforms and can't really debug it because of that. A number of 4 seconds sounds like another issue though.