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

Rails 6 parallel tests causes parallel debuggers #676

Open
gdomingu opened this issue Apr 30, 2020 · 1 comment
Open

Rails 6 parallel tests causes parallel debuggers #676

gdomingu opened this issue Apr 30, 2020 · 1 comment

Comments

@gdomingu
Copy link

gdomingu commented Apr 30, 2020

Problem description

Working in a Rail 6.0.2.2 project with byebug 11.1.2. my test_helper.rb has parallelize(workers: :number_of_processors) in it by default.

When I run the test suite with rails test. I get put into parallel byebug bindings.

Expected behavior

I expect it to just put me in one binding at a time.

Actual behavior

Puts me in two byebug debuggers at once. In order to type I need to hit each key twice before it shows up in terminal.

[7, 16] in /test/models/foo_test.rb
    7:    test "it does the thing again" do
    8:     Foo.do_it
    9:   end
   10: end
   11: 
   12: class Foo
   13:   def self.do_it
   14:     byebug
=> 15:   end
   16: end

[7, 16] in /test/models/foo_test.rb
    7:    test "it does the thing again" do
    8:     Foo.do_it
    9:   end
   10: end
   11: 
   12: class Foo
   13:   def self.do_it
   14:     byebug
=> 15:   end
   16: end

Steps to reproduce the problem

  1. Create a new rails 6 project.
  2. Uncomment byebug from gemfile.
  3. Bundle
  4. Make sure parallelize(workers: :number_of_processors) is in test_helper.rb
  5. Create a test like the following:
require 'test_helper'

class FooTest < ActiveSupport::TestCase
  test "it does the thing" do
    Foo.do_it
  end
   test "it does the thing again" do
    Foo.do_it
  end
end

class Foo
  def self.do_it
    byebug
  end
end
  1. Run bundle exec rails test
@wilg
Copy link

wilg commented Jul 6, 2021

Having this issue too

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

2 participants