Issue Type: Bug Bug
Affects Versions: JRuby 1.7.1
Assignee: Unassigned
Components: Application Error, Extensions
Created: 13/Dec/12 1:24 PM
Description:

When passing the RSpec invocation to Nailgun's JVM, any failing spec causes the process to hard crash with a SystemExit after completion.

To reproduce the bug, the Nailgun server is first started up as follows:

$ jruby --ng-server &

I created two trivial specs to illustrate the error:


simple_pass.rb
describe "Simple Pass" do
  it "should pass" do
    true.should be_true
  end
end
simple_fail.rb
describe "Simple Fail" do
  it "should fail" do
    true.should be_false
  end
end

Running the passing spec with the --ng option to pass to Nailgun works fine:

$ jruby --ng -S rspec simple_pass.rb 
.

Finished in 0.004 seconds
1 example, 0 failures

$ echo $?
0

However, running the failing spec ends with an abnormal exit:

$ jruby --ng -S rspec simple_fail.rb
F

Failures:

  1) Simple Fail should fail
     Failure/Error: true.should be_false
       expected: false value
            got: true
     # ./simple_fail.rb:3:in `(root)'

Finished in 0.005 seconds
1 example, 1 failure

Failed examples:

rspec ./simple_fail.rb:2 # Simple Fail should fail
org.jruby.exceptions.RaiseException: (SystemExit) exit

$ echo $?
131

Running without the *--ng* option (i.e., spawning a new JVM instead of using Nailgun's) caused the second example to exit cleanly, without the org.jruby.exceptions.RaiseException: (SystemExit) exit output and with a 0 exit code.

This behavior is consistent in more complex suites, and also occurs when running RSpec within Guard. (The desire to speed things up in Guard is in fact why I wanted to use Nailgun.) The inconsistent behavior when not passing to Nailgun is why my first guess was that this was some sort of RSpec bug; I've raised an issue on their Github project as well, but the maintainer said he would have to talk to the JRuby guys.

Thanks very much for your time.

Environment: * JRuby 1.7.1 (under rbenv using ruby-build 20121204)
* rspec (2.12.0)
* rspec-core (2.12.1)
* rspec-expectations (2.12.0)
* rspec-mocks (2.12.0)
Project: JRuby
Labels: nailgun rspec
Priority: Major Major
Reporter: Stephen Eley
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to