Closed heimidal closed 14 years ago
Can you try two things for me:
1) Show me the output of: rspec path/to/failing/file
2) Create a hydra testtask with just the one failing file in it. Then set "t.verbose = true" in the test task and run the hydra task.
-Nick
Output of rspec spec/models/content_spec.rb
:
.F....................
Failures:
1) Content with out a thread local user versioning should be true
Failure/Error: false.should be_true
expected false to be true
# ./spec/models/content_spec.rb:15
# ./vendor/bundle/ruby/1.8/gems/activesupport-3.0.0/lib/active_support/dependencies.rb:239:in `inject'
Finished in 4.49 seconds
22 examples, 1 failure
And running RAILS_ENV=test rake hydra:test
using this task:
Hydra::TestTask.new('hydra:test') do |t|
require 'spec/spec_helper'
t.add_files 'spec/models/content_spec.rb'
t.verbose = true
end
...outputs the following:
(in /Users/brianrose/Projects/protosite)
1283894815.82826 MASTER| Initialized
1283894815.8283 MASTER| Files: (["spec/models/content_spec.rb"])
1283894815.82832 MASTER| Workers: ([{"type"=>"local", "runners"=>4}])
1283894815.82834 MASTER| Verbose: (true)
Hydra Testing [> ] 0/11283894815.82843 MASTER| Booting 1 workers
1283894815.82845 MASTER| worker opts {"type"=>"local", "runners"=>4}
1283894815.82847 MASTER| Booting local worker
1283894815.831 MASTER| Processing Messages
1283894815.83139 MASTER| Workers: [{:type=>:local, :idle=>false, :pid=>93829, :io=>#<Hydra::Pipe @reader=#<IO:0x105209b98>, @writer=#<IO:0x105209c38>>}]
1283894815.83186 MASTER| Listening to {:type=>:local, :idle=>false, :pid=>93829, :io=>#<Hydra::Pipe @reader=#<IO:0x105209b98>, @writer=#<IO:0x105209c38>>}
1283894815.83546 WORKER| hydra_worker_init.rb not present
1283894815.83568 WORKER| Booting 4 Runners
1283894815.84135 WORKER| 4 Runners booted
1283894815.84187 WORKER| Processing Messages
1283894815.84283 MASTER| got message: #<Hydra::Messages::Worker::WorkerBegin:0x1052079b0>
1283894815.84513 RUNNER| Booted. Sending Request for file
1283894815.84513 RUNNER| Booted. Sending Request for file
1283894815.84539 RUNNER| Booted. Sending Request for file
1283894815.84574 RUNNER| Processing Messages
1283894815.84593 RUNNER| Processing Messages
1283894815.8462 RUNNER| Processing Messages
1283894815.84636 WORKER| Received Message from Runner
1283894815.84649 WORKER| Received Message from Runner
1283894815.84661 WORKER| Received Message from Runner
1283894815.84677 WORKER| #<Hydra::Messages::Runner::RequestFile:0x105202668>
1283894815.84683 WORKER| #<Hydra::Messages::Runner::RequestFile:0x1052022d0>
1283894815.84687 WORKER| #<Hydra::Messages::Runner::RequestFile:0x105201f38>
1283894815.84763 MASTER| got message: #<Hydra::Messages::Worker::RequestFile:0x105207618>
1283894815.84774 MASTER| Sending "spec/models/content_spec.rb"
1283894815.84794 MASTER| got message: #<Hydra::Messages::Worker::RequestFile:0x105206e98>
1283894815.84798 MASTER| No more files to send
1283894815.84804 MASTER| got message: #<Hydra::Messages::Worker::RequestFile:0x105206a60>
1283894815.84809 MASTER| No more files to send
1283894815.8484 WORKER| Received Message from Master
1283894815.84852 WORKER| #<Hydra::Messages::Master::RunFile:0x105201060 @file="spec/models/content_spec.rb">
1283894815.84963 RUNNER| Received message from worker
1283894815.84971 RUNNER| #<Hydra::Messages::Worker::RunFile:0x105206740 @file="spec/models/content_spec.rb">
1283894815.84977 RUNNER| Running file: spec/models/content_spec.rb
1283894815.85202 RUNNER| Booted. Sending Request for file
1283894815.85271 RUNNER| Processing Messages
1283894815.85294 WORKER| Received Message from Runner
1283894815.85298 WORKER| #<Hydra::Messages::Runner::RequestFile:0x1052004d0>
1283894815.85319 MASTER| got message: #<Hydra::Messages::Worker::RequestFile:0x105206628>
1283894815.85323 MASTER| No more files to send
1283894820.86268 WORKER| Received Message from Runner
1283894820.8628 WORKER| #<Hydra::Messages::Runner::Results:0x1051ffcb0 @file="spec/models/content_spec.rb", @output=".">
1283894820.86336 MASTER| got message: #<Hydra::Messages::Worker::Results:0x105206010>
1283894820.86347 MASTER| 0 Files Remaining
Hydra Testing [##############################>] 1/11283894820.86393 MASTER| Shutting down all workers
1283894820.86415 WORKER| Received Message from Master
1283894820.8642 WORKER| #<Hydra::Messages::Master::Shutdown:0x1051feef0>
Hydra Testing [###############1283894820.86427 WORKER| Notifying 4 Runners of Shutdown
###############>1283894820.86431 WORKER| Sending Shutdown to Runner
] 1/1
1283894820.86463 WORKER| {:idle=>true, :pid=>93830, :io=>#<Hydra::Pipe @reader=#<IO:0x105208158>, @writer=#<IO:0x1052081d0>>}
1283894820.86473 WORKER| Sending Shutdown to Runner
1283894820.86485 RUNNER| Received message from worker
1283894820.86485 WORKER| {:idle=>true, :pid=>93831, :io=>#<Hydra::Pipe @reader=#<IO:0x105206d08>, @writer=#<IO:0x105206d80>>}
1283894820.8649 RUNNER| #<Hydra::Messages::Worker::Shutdown:0x104fbaba8>
1283894820.86492 WORKER| Sending Shutdown to Runner
1283894820.86511 WORKER| {:idle=>true, :pid=>93832, :io=>#<Hydra::Pipe @reader=#<IO:0x105205980>, @writer=#<IO:0x1052059f8>>}
1283894820.86518 WORKER| Sending Shutdown to Runner
1283894820.86548 WORKER| {:idle=>true, :pid=>93833, :io=>#<Hydra::Pipe @reader=#<IO:0x1052044b8>, @writer=#<IO:0x105204530>>}
1283894820.86619 RUNNER| Received message from worker
1283894820.86628 RUNNER| #<Hydra::Messages::Worker::Shutdown:0x1052054a8>
1283894820.86739 RUNNER| Received message from worker
1283894820.86774 RUNNER| #<Hydra::Messages::Worker::Shutdown:0x105203f90>
1283894820.86819 RUNNER| Received message from worker
1283894820.86837 RUNNER| #<Hydra::Messages::Worker::Shutdown:0x105202c58>
1283894821.21543 WORKER| Done processing messages
I hope that helps. :)
OK, this narrows it down. It shows that hydra is functioning properly and that it is actually running the file and getting a passing result back.
At this point, we're going to need to look at your code. If possible, please try to create a minimal example of what is failing. You can do this by making a copy of the file and deleting code to figure out what part of it is passing / failing. Once you get a minimal example, please paste it @ gist.github.com and I'll check it out.
-Nick
That's strange -- the failing example just contains 'false.should be_true'. When I am near a computer, I'll remove all of the other specs so that only that one is in the file and let you know the result.
I've got the same issue. I have a deliberately failing spec and nothing is returned from Hydra but rake spec works properly. I'm on the latest rspec and rails 3.
Hey guys, can you make a minimal example of this issue? Maybe create a git repo of rails 3 w/ rspec 2 and hydra and a failing spec that does not fail in hydra? That would help me a ton in tracking down this bug.
Here's a repo with a failing hydra: http://github.com/johnae/Hydra-fails-to-report-failing-spec
Thanks! I will check this out.
I don't get any results back either as far as the final status of all the tests. I am using Padrino with rspec 2.0.0.beta.20. I thought I was missing something in a config until I checked the issues here.
It's a version issue. Seems rspec changed some things between beta19 and beta20-22.
I'm going to add a section to the wiki page "Why isn't it working" that will refer people to the correct gem versions.
Also, in general it's probably a bad idea to point gems in the Gemfile to github urls, unless you need a bleeding-edge commit. In that case, you should add the :ref key to lock it to a version. Instead, you should lock to a specific gem version.
-Nick
When running specs with Hydra, nothing is returned. The exit status code is not set, and no output is returned when a spec fails:
If I run 'rake spec', I have a failing spec. Any idea what might be going on?
I'm running Hydra 0.22.1 and RSpec 2.0.0.beta.20.