Skip to content

Commit

Permalink
Fix randomly failing tests
Browse files Browse the repository at this point in the history
Global state in tests, yay
  • Loading branch information
jacobat committed Oct 26, 2017
1 parent 54f6ae9 commit db1760d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/connection_switching_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,8 @@ class UnshardedModel < ActiveRecord::Base
refute t.comments.empty?
assert_equal 'slave comment', t.comments.first.body
end
Ticket.on_slave_by_default = false
Comment.on_slave_by_default = false
end

it "sets up has and belongs to many sharded-ness correctly when sharded" do
Expand Down

0 comments on commit db1760d

Please sign in to comment.