Skip to content

Commit 3ac5706

Browse files
committed
Use string keys for test setup
When using symbol keys, this creates non deterministic behavior. It creates a hash with both a symbol and string key for host, which means that it depends on hash ordering which hosts it uses. Since in 1.8 hash ordering is not defined, this creates random errors. Fixes that sometimes it fails on Rubinius and REE in #334
1 parent bbe52ea commit 3ac5706

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spec/mysql2/client_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
lambda {
1111
# The odd local host IP address forces the mysql client library to
1212
# use a TCP socket rather than a domain socket.
13-
Mysql2::Client.new DatabaseCredentials['root'].merge(:host => '127.0.0.2', :port => 999999)
13+
Mysql2::Client.new DatabaseCredentials['root'].merge('host' => '127.0.0.2', 'port' => 999999)
1414
}.should raise_error(Mysql2::Error)
1515
end
1616

0 commit comments

Comments
 (0)