Skip to content
Browse files

Merge pull request #7294 from stevecj/fix-psql-reconnect-after-simula…

…ted-disconnect-test

Fix only-once stub logic.
  • Loading branch information...
2 parents ec923ab + 1e17a9d commit b8903f3606c52b16f248679b086c4f2cf9970692 @rafaelfranca rafaelfranca committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/test/cases/adapters/postgresql/connection_test.rb
View
2 activerecord/test/cases/adapters/postgresql/connection_test.rb
@@ -92,9 +92,9 @@ def test_reconnection_after_simulated_disconnection_with_verify
def query_fake(*args)
if !( @called ||= false )
self.stubs(:status).returns(PGconn::CONNECTION_BAD)
+ @called = true
raise PGError
else
- @called = true
self.unstub(:status)
query_unfake(*args)
end

0 comments on commit b8903f3

Please sign in to comment.
Something went wrong with that request. Please try again.