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

Flaky test #124

Open
bquorning opened this issue Sep 6, 2017 · 0 comments
Open

Flaky test #124

bquorning opened this issue Sep 6, 2017 · 0 comments

Comments

@bquorning
Copy link
Member

From time to time I’ve seen the Rails 4.2 tests fail with a few (1-2) examples failing with NoMethodError: undefined method `mysql2_connection' for ActiveRecord::Base:Class. Re-running the test suite usually makes the test pass, and it makes me feel bad for it…

Example:

Database rake tasks::db:create#test_0001_creates the database and all shards:
NoMethodError: undefined method `mysql2_connection' for ActiveRecord::Base:Class
    /home/travis/build/zendesk/active_record_shards/gemfiles/vendor/bundle/ruby/2.4.0/gems/activerecord-4.2.9/lib/active_record/dynamic_matchers.rb:26:in `method_missing'
    /home/travis/build/zendesk/active_record_shards/lib/active_record_shards/tasks.rb:94:in `root_connection'
    /home/travis/build/zendesk/active_record_shards/lib/active_record_shards/tasks.rb:40:in `block (3 levels) in <top (required)>'
    /home/travis/build/zendesk/active_record_shards/lib/active_record_shards/tasks.rb:31:in `each'
    /home/travis/build/zendesk/active_record_shards/lib/active_record_shards/tasks.rb:31:in `block (2 levels) in <top (required)>'
    /home/travis/build/zendesk/active_record_shards/gemfiles/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `block in execute'
    /home/travis/build/zendesk/active_record_shards/gemfiles/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `each'
    /home/travis/build/zendesk/active_record_shards/gemfiles/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:250:in `execute'
    /home/travis/build/zendesk/active_record_shards/gemfiles/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:194:in `block in invoke_with_call_chain'
    /home/travis/.rvm/rubies/ruby-2.4.0/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
    /home/travis/build/zendesk/active_record_shards/gemfiles/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:187:in `invoke_with_call_chain'
    /home/travis/build/zendesk/active_record_shards/gemfiles/vendor/bundle/ruby/2.4.0/gems/rake-12.0.0/lib/rake/task.rb:180:in `invoke'
    /home/travis/build/zendesk/active_record_shards/test/helper.rb:75:in `rake'
    /home/travis/build/zendesk/active_record_shards/test/tasks_test.rb:42:in `block (3 levels) in <top (required)>'

cc @pschambacher @grosser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants