Skip to content

Commit 60cc870

Browse files
committed
do not assume MySQL official JDBC driver internals in test
1 parent 6a1e933 commit 60cc870

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/db/mysql/simple_test.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,10 @@ def test_mysql_indexes
222222

223223
test 'sets default connection properties' do
224224
connection = ActiveRecord::Base.connection.jdbc_connection(true)
225-
assert_equal 'false', connection.properties['jdbcCompliantTruncation']
226-
assert_equal 'true' , connection.properties['useUnicode']
225+
if connection.java_class.name =~ /^com.mysql.jdbc/
226+
assert_equal 'true' , connection.properties['useUnicode']
227+
assert_equal 'false', connection.properties['jdbcCompliantTruncation']
228+
end
227229
end if defined? JRUBY_VERSION
228230

229231
test "config :host" do

0 commit comments

Comments
 (0)