debug icon indicating copy to clipboard operation
debug copied to clipboard

Adding debug gem to Gemfile breaks test suite

Open mperham opened this issue 2 years ago • 2 comments

Your environment

  • ruby -v: 3.1.2
  • rdbg -v: 1.6.2

Describe the bug

I get tons of these errors when I add gem "debug" to my Gemfile and run the Sidekiq 7.0 test suite. I'm not changing any other code.

Error:
API::with an empty database#test_0022_requires a jid to delete an entry:
RedisClient::CannotConnectError: getaddrinfo: nodename nor servname provided, or not known
    /Users/mperham/.rubies/ruby-3.1.2/lib/ruby/3.1.0/socket.rb:227:in `getaddrinfo'
    /Users/mperham/.rubies/ruby-3.1.2/lib/ruby/3.1.0/socket.rb:227:in `foreach'
    /Users/mperham/.rubies/ruby-3.1.2/lib/ruby/3.1.0/socket.rb:632:in `tcp'
    /Users/mperham/.gem/ruby/3.1.2/gems/redis-client-0.7.1/lib/redis_client/ruby_connection.rb:48:in `initialize'
    /Users/mperham/.gem/ruby/3.1.2/gems/redis-client-0.7.1/lib/redis_client.rb:639:in `new'

Removing it makes the test suite work again.

mperham avatar Aug 22 '22 22:08 mperham

Can you provide more repro steps? I added debug to the 7-0 branch and all tests passed:

 group :development, :test do
   gem "standard", require: false
+  gem "debug"
+
   # gem "pry"
   # gem "yalphabetize", require: false
 end
❯ git rev-list HEAD | head -1
3c93f643af5d5ae07b32099808b2e4be7ae7b94e

❯ ruby -v
ruby 3.1.2p20 (2022-04-12 revision 4491bb740a) [x86_64-darwin21]

❯ bundle show debug
/Users/st0012/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/debug-1.6.2

❯ be rake
/Users/st0012/.rbenv/versions/3.1.2/lib/ruby/gems/3.1.0/gems/activesupport-6.1.6.1/lib/active_support/core_ext/class/subclasses.rb:30: warning: method redefined; discarding old subclasses
-- create_table(:posts)
   -> 0.0004s
Run options: --seed 27517

# Running:

.............................................................................................................................................................................................................................................................................................................................................................................................................................

Fabulous run in 7.083498s, 58.3045 runs/s, 187.4780 assertions/s.
413 runs, 1328 assertions, 0 failures, 0 errors, 0 skips

st0012 avatar Aug 22 '22 22:08 st0012

Try the "config" branch.

mperham avatar Aug 22 '22 22:08 mperham

@mperham is this still a problem? It looks like the config branch has been deleted.

andyw8 avatar Mar 07 '23 22:03 andyw8

It’s main now.

mperham avatar Mar 08 '23 04:03 mperham

Ah, I see. I uncommented debug and is everything is passing, so can this be closed?

andyw8 avatar Mar 09 '23 14:03 andyw8