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

rspec always return 1 when executed through Spork on Windows #210

Open
os97673 opened this issue Sep 22, 2012 · 7 comments
Open

rspec always return 1 when executed through Spork on Windows #210

os97673 opened this issue Sep 22, 2012 · 7 comments

Comments

@os97673
Copy link

os97673 commented Sep 22, 2012

This is Windows-specific issue.
When I run rspec w/o Spork its's exit code behaves as expected (0 - passed, 1 - failed, and honor --failure-exit-code), but when I run tests using Spork it always exits with code 1.
Initially I've filed this as bug againsr rspec (rspec/rspec-core#641), but after investigation I've found that the cause of the problem is in Spork::RunStrategy::Magazine which is used for JRuby and on Windows. And the actual result is lost somewhere between Magazine and MagazineSlave (Magazine.run receives IO object instead of integer from slave). All this reproducible with ruby 1.8.7p358, when I tried to use ruby 1.9.3p194 Magazine.run() just hangs on Rinda::RingFinger.primary :(

Here are files you need to reproduce the problem:

Gemfile

source "https://rubygems.org"

gem "rspec"
gem 'spork'

spec/test_spec.rb

require 'spec_helper'

describe "simple rspec test" do
  it "should just pass" do
  end
end

spec_helper.rb

require 'rubygems'
require 'spork'

Spork.prefork do
end

Spork.each_run do
end

require 'rspec'
@jdmarshall
Copy link

I'm having the same problem using MRI with Spork. It's causing my Rake task to bail out after the tests instead of completing. I have a task that runs rspec and then Jasmine tests and the Jasmine tests never get run.

@os97673
Copy link
Author

os97673 commented Nov 23, 2012

The hang might be fixed by #214 pull request

@alindeman
Copy link

Can @jdmarshall or @os97673 verify? Thanks much.

@alindeman
Copy link

Whoops, for some reason I thought this issue was on rspec.

@jdmarshall
Copy link

So did you need me to test something?

@jdmarshall
Copy link

This patch seems to fix the problem.

@takaokouji
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants