minitest / minitest-bisect

Hunting down random test failures can be very very difficult, sometimes impossible, but minitest-bisect makes it easy.

Home Page:http://docs.seattlerb.org/minitest-bisect

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Infinity (FloatDomainError)

aaronbbrown opened this issue · comments

When trying to bisect a failing test, I get the following error:

$ minitest_bisect --seed 7688 spec/notebook_spec.rb
reproducing...
reproduced
/Users/aaron/.rvm/gems/ruby-2.1.1@dalek/gems/minitest-bisect-1.3.0/lib/minitest/find_minimal_combination.rb:34:in `round': -Infinity (FloatDomainError)
    from /Users/aaron/.rvm/gems/ruby-2.1.1@dalek/gems/minitest-bisect-1.3.0/lib/minitest/find_minimal_combination.rb:34:in `block in find_minimal_combination'
    from /Users/aaron/.rvm/gems/ruby-2.1.1@dalek/gems/minitest-bisect-1.3.0/lib/minitest/find_minimal_combination.rb:33:in `loop'
    from /Users/aaron/.rvm/gems/ruby-2.1.1@dalek/gems/minitest-bisect-1.3.0/lib/minitest/find_minimal_combination.rb:33:in `find_minimal_combination'
    from /Users/aaron/.rvm/gems/ruby-2.1.1@dalek/gems/minitest-bisect-1.3.0/lib/minitest/find_minimal_combination.rb:111:in `find_minimal_combination'
    from /Users/aaron/.rvm/gems/ruby-2.1.1@dalek/gems/minitest-bisect-1.3.0/lib/minitest/find_minimal_combination.rb:117:in `find_minimal_combination_and_count'
    from /Users/aaron/.rvm/gems/ruby-2.1.1@dalek/gems/minitest-bisect-1.3.0/lib/minitest/bisect.rb:104:in `bisect_methods'
    from /Users/aaron/.rvm/gems/ruby-2.1.1@dalek/gems/minitest-bisect-1.3.0/lib/minitest/bisect.rb:51:in `run'
    from /Users/aaron/.rvm/gems/ruby-2.1.1@dalek/gems/minitest-bisect-1.3.0/lib/minitest/bisect.rb:26:in `run'
    from /Users/aaron/.rvm/gems/ruby-2.1.1@dalek/gems/minitest-bisect-1.3.0/bin/minitest_bisect:5:in `<top (required)>'
    from /Users/aaron/.rvm/gems/ruby-2.1.1@dalek/bin/minitest_bisect:23:in `load'
    from /Users/aaron/.rvm/gems/ruby-2.1.1@dalek/bin/minitest_bisect:23:in `<main>'
    from /Users/aaron/.rvm/gems/ruby-2.1.1@dalek/bin/ruby_executable_hooks:15:in `eval'
    from /Users/aaron/.rvm/gems/ruby-2.1.1@dalek/bin/ruby_executable_hooks:15:in `<main>'

My Gemfile.lock is

PATH
  remote: .
  specs:
    amplify-dalek (0.0.1)
      addressable
      aws-sdk-v1
      gli
      mysql
      sequel

GEM
  remote: https://rubygems.org/
  specs:
    addressable (2.3.8)
    ansi (1.5.0)
    aws-sdk-v1 (1.66.0)
      json (~> 1.4)
      nokogiri (>= 1.4.4)
    builder (3.2.2)
    fixture_dependencies (1.6.0)
    gli (2.13.2)
    json (1.8.3)
    mini_portile (0.6.2)
    minitest (5.8.2)
    minitest-bisect (1.3.0)
      minitest-server (~> 1.0)
    minitest-reporters (1.1.4)
      ansi
      builder
      minitest (>= 5.0)
      ruby-progressbar
    minitest-server (1.0.3)
      minitest (~> 5.0)
    mysql (2.9.1)
    nokogiri (1.6.6.2)
      mini_portile (~> 0.6.0)
    rake (10.4.2)
    ruby-progressbar (1.7.5)
    sequel (4.27.0)

PLATFORMS
  ruby

DEPENDENCIES
  amplify-dalek!
  bundler (~> 1.3)
  fixture_dependencies
  minitest (~> 5)
  minitest-bisect (~> 1.3)
  minitest-reporters
  rake

I'm not entirely certain yet. I believe that all my tests were failing
within the bisect. Once I fixed that, the bisect kicked off. I'll see if I
can make a treat scenario.
On Oct 28, 2015 22:44, "Ryan Davis" notifications@github.com wrote:

That's kinda awesome!

Any clue how to repro?


Reply to this email directly or view it on GitHub
#9 (comment)
.

On Oct 29, 2015, at 05:38, Aaron Brown notifications@github.com wrote:

I'm not entirely certain yet. I believe that all my tests were failing
within the bisect. Once I fixed that, the bisect kicked off. I'll see if I
can make a treat scenario.

OK. I'll try that. Thanks.

Perfect. I have a repro with this:

#!/usr/bin/ruby

require "minitest/autorun"

class TestBorked < Minitest::Test
  10.times do |n|
    name = "test_borked_%03d" % (n+1)
    define_method name do
      assert false
    end
  end
end

OK. There's no good solution to this problem so I'm having it do the following:

% ruby -Ilib bin/minitest_bisect bug_009.rb
reproducing...
reproduced
Nothing to verify against because every test failed. Aborting.

Fixed and will be released soon.