Note that there are some explanatory texts on larger screens.

plurals
  1. POSpork and minitest: testdrb exits with SystemExit exception
    text
    copied!<p>I have a Rails 3.2 project with spork-rails and spork-minitest installed. I also have an integration test that runs successfully (albeit very slowly) with the command <code>rake test:integration</code>.</p> <p>Now, with spork running on port 8988, I attempt to run the tests through testdrb:</p> <pre><code>$ bundle exec testdrb -Itest test/integration/**/*_test.rb No examples found. Finished in 0.00141 seconds 0 examples, 0 failures Randomized with seed 35511 Exception encountered: #&lt;SystemExit: exit&gt; backtrace: /home/mike/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/test/unit.rb:326:in `exit' /home/mike/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/test/unit.rb:326:in `block (2 levels) in autorun' /home/mike/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/test/unit.rb:27:in `run_once' /home/mike/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/test/unit.rb:325:in `block in autorun' /home/mike/.rvm/gems/ruby-1.9.3-p286@myproject/gems/spork-1.0.0rc3/lib/spork.rb:77:in `call' /home/mike/.rvm/gems/ruby-1.9.3-p286@myproject/gems/spork-1.0.0rc3/lib/spork.rb:77:in `exec_after_each_run' /home/mike/.rvm/gems/ruby-1.9.3-p286@myproject/gems/spork-1.0.0rc3/lib/spork/run_strategy/forking.rb:14:in `block in run' /home/mike/.rvm/gems/ruby-1.9.3-p286@myproject/gems/spork-1.0.0rc3/lib/spork/forker.rb:21:in `block in initialize' /home/mike/.rvm/gems/ruby-1.9.3-p286@myproject/gems/spork-1.0.0rc3/lib/spork/forker.rb:18:in `fork' /home/mike/.rvm/gems/ruby-1.9.3-p286@myproject/gems/spork-1.0.0rc3/lib/spork/forker.rb:18:in `initialize' /home/mike/.rvm/gems/ruby-1.9.3-p286@myproject/gems/spork-1.0.0rc3/lib/spork/run_strategy/forking.rb:9:in `new' /home/mike/.rvm/gems/ruby-1.9.3-p286@myproject/gems/spork-1.0.0rc3/lib/spork/run_strategy/forking.rb:9:in `run' /home/mike/.rvm/gems/ruby-1.9.3-p286@myproject/gems/spork-1.0.0rc3/lib/spork/server.rb:48:in `run' /home/mike/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/drb/drb.rb:1548:in `perform_without_block' /home/mike/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/drb/drb.rb:1508:in `perform' /home/mike/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/drb/drb.rb:1586:in `block (2 levels) in main_loop' /home/mike/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/drb/drb.rb:1582:in `loop' /home/mike/.rvm/rubies/ruby-1.9.3-p286/lib/ruby/1.9.1/drb/drb.rb:1582:in `block in main_loop' </code></pre> <p>Meanwhile, the Spork terminal outputs a successful test run:</p> <pre><code>Running tests with args ["-Itest/", "test/integration/admin/user_test.rb"]... Run options: # Running tests: Finished tests in 1.551147s, 0.6447 tests/s, 0.6447 assertions/s. 1 tests, 1 assertions, 0 failures, 0 errors, 0 skips Done. </code></pre> <p>Essentially everything is working with the exception of this SystemExit error. It appears to come from the minitest autorun code, which installs an at_exit handler, and then calls exit() within that handler. Is there anything I can do to get rid of this error?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload