The last file keeps hanging
millisami opened this issue · 3 comments
First I tried hydra with Rails 3.0.x app that uses Mongodb via Mongoid ORM in Ruby 1.9
Later I came to know that its not compatible with Ruby 1.9
Then I switched the env to ruby-1.8.7-p352 and started the rake again.
Now it runs but it keeps hanging on the last file saying No more files remaining.
Hydra Testing [############################> ] 54/561317296880.73323 MASTER| Sending "spec/models/worker_spec.rb"
1317296880.75142 WORKER| Received Message from Master
1317296880.75158 WORKER| #<Hydra::Messages::Master::RunFile:0x108d8f578 @file="spec/models/worker_spec.rb">
1317296882.2506 WORKER| Received Message from Runner
1317296882.25112 WORKER| #<Hydra::Messages::Runner::Results:0x108d8c968 @file="spec/models/worker_spec.rb", @output=".">
1317296882.2803 MASTER| got message: #<Hydra::Messages::Worker::Results:0x108dde240>
1317296882.28061 MASTER| 1 Files Remaining
Hydra Testing [#############################> ] 55/561317296882.29699 MASTER| No more files to send
What causes this?
try adding your test files in small batches until the problem occurs, then try to narrow it down to a single test file (or maybe one or two together).
It may be something in those files that is hanging.
Just because there are no more files to send does not mean that some files are still being processed. So it's probably just hanging on one file.
Well, I subtracted the files and brought down to all fles processed. But the output is strange:
1317381837.279 MASTER| 2 Files Remaining
Hydra Testing [############################> ] 50/521317381837.2835 MASTER| Sending "spec/models/unit_spec.rb"
1317381837.28401 WORKER| Received Message from Master
1317381837.2842 WORKER| #<Hydra::Messages::Master::RunFile:0x11013d290 @file="spec/models/unit_spec.rb">
1317381851.58961 WORKER| Received Message from Runner
1317381851.58966 WORKER| #<Hydra::Messages::Runner::Results:0x11013bfd0 @file="spec/models/station_spec.rb", @output=".">
1317381851.58983 MASTER| got message: #<Hydra::Messages::Worker::Results:0x110168ee0>
1317381851.58986 MASTER| 1 Files Remaining
Hydra Testing [#############################> ] 51/521317381851.59063 MASTER| No more files to send
1317381854.66553 WORKER| Received Message from Runner
1317381854.66564 WORKER| #<Hydra::Messages::Runner::Results:0x11013a900 @file="spec/models/unit_spec.rb", @output=".">
1317381854.66595 MASTER| got message: #<Hydra::Messages::Worker::Results:0x110167e78>
1317381854.66599 MASTER| 0 Files Remaining
Hydra Testing [##############################>] 52/521317381854.66634 MASTER| Shutting down all workers
1317381854.66655 WORKER| Received Message from Master
Hydra Testing [##############################>] 52/52
1317381854.66689 WORKER| #<Hydra::Messages::Master::Shutdown:0x110139230>
1317381854.66692 WORKER| Notifying 2 Runners of Shutdown
1317381854.66694 WORKER| Sending Shutdown to Runner
1317381854.66709 WORKER| {:pid=>18820, :io=>#<Hydra::Pipe @reader=#<IO:0x1101b98e0>, @writer=#<IO:0x1101b9cf0>>, :idle=>true}
1317381854.66714 WORKER| Sending Shutdown to Runner
1317381854.66719 WORKER| {:pid=>18821, :io=>#<Hydra::Pipe @reader=#<IO:0x1101b8e40>, @writer=#<IO:0x1101b90c0>>, :idle=>true}
Loaded suite /Users/millisami/.rvm/gems/ree-1.8.7-2011.03/bin/rake
Started
Finished in 0.000538 seconds.
0 tests, 0 assertions, 0 failures, 0 errors
Loaded suite /Users/millisami/.rvm/gems/ree-1.8.7-2011.03/bin/rake
Started
Finished in 0.007795 seconds.
0 tests, 0 assertions, 0 failures, 0 errors
Finished in 221.911690 seconds.
rake aborted!
Hydra: Not all tests passes
Tasks: TOP => hydra => hydra:safe
(See full trace by running task with --trace)
1317381858.05785 WORKER| Done processing messages
RAILS_ENV=test bundle exec rake hydra 18.63s user 5.86s system 8% cpu 4:50.66 total
Loaded suite /Users/millisami/.rvm/gems/ree-1.8.7-2011.03/bin/rake
Started
Finished in 0.000261 seconds.
0 tests, 0 assertions, 0 failures, 0 errors
looks to me like station_spec is not finishing. Try making a hydra task where the only line in it is:
t.add_files 'spec/models/station_spec'
and see how that goes.
Also, just for kicks, try it by forcing rspec version 2.0.0.beta.19.