Permalink
Browse files

Merge pull request #26869 from prathamesh-sonpatki/fix-brittle-mysql-…

…tests

Fix brittle tests which were relying on the error message text from mysql2 gem
  • Loading branch information...
guilleiguaran committed Oct 25, 2016
2 parents e9e31af + c5a4d00 commit 5f6f911e1f7e0f525cbfd74b89abdfbc9f6b7268
Showing with 4 additions and 4 deletions.
  1. +4 −4 activerecord/test/cases/adapters/mysql2/connection_test.rb
@@ -65,18 +65,18 @@ def test_successful_reconnection_after_timeout_with_verify
def test_execute_after_disconnect
@connection.disconnect!
error = assert_raise(ActiveRecord::StatementInvalid) do
assert_raise(ActiveRecord::StatementInvalid) do
@connection.execute("SELECT 1")
end
assert_match(/MySQL client is not connected/, error.message)
end
def test_quote_after_disconnect
@connection.disconnect!
error = assert_raise(Mysql2::Error) do
assert_raise(Mysql2::Error) do
@connection.quote("string")
end
assert_match(/MySQL client is not connected/, error.message)
end
def test_active_after_disconnect

0 comments on commit 5f6f911

Please sign in to comment.