1

I thought I'd try using rspec --bisect to figure out which combinations of tests caused a failure, but it turns out that this doesn't work with JRuby, or at least, not when launching org.jruby.Main via java, which is how all our automated tests are set up.

The way bisect apparently works is that it launches a child rspec process.

What actually happens is...

Stderr:
sh: uri:classloader:/META-INF/jruby.home/bin/jruby: No such file or directory

Apparently rspec tells sh to run the command for some reason. And because the command is inside the jar, this obviously can't work. If it had executed rspec directly, that might work because rspec is a Ruby executable and JRuby might treat that differently. (There sure is a lot of "might" in here, though.)

So what I'm wondering is, is there some quick fix I can apply here to make rspec use some other method to launch the child process? Maybe it doesn't need to launch a new process? Or maybe there is a way to tell it how to launch the child process?

Hakanai
  • 12,010
  • 10
  • 62
  • 132
  • *"figure out which combinations of tests caused a failure"* what is this supposed to mean? if these "combinations" are inside an `it` block then [`aggregate_failures`](https://relishapp.com/rspec/rspec-expectations/docs/aggregating-failures) might be useful to you. – engineersmnky Aug 08 '17 at 15:01
  • @engineersmnky Suppose that you have 100 examples in a spec, and example 72 fails when you run all 100 examples, but when you run _just_ example 72, it passes. You could run different combinations of tests manually to figure out which test is leaky, but an alternative is to run `rspec --bisect` and go and get a coffee while it figures this out via some kind of binary search. – Hakanai Aug 09 '17 at 01:10
  • @Trejkaz Hei! I know this is over a year late, but... I'm currently running a bisection under jruby and prompt is hanged a "Running suite to find failures...", but no errors (yet). Do you recommend that I go get a coffee, or this is not going to work at all? – deivid Oct 12 '18 at 14:12
  • 1
    @deivid good question... I guess it depends on how long the suite takes normally too, but it's going to run it many, many times, so I usually do that sort of thing over the weekend, in which case I can fit in many coffees. – Hakanai Oct 15 '18 at 03:44

0 Answers0