Skip to content

Commit 0be2204

Browse files
committed
Fix some tests for non-default creds
1 parent e62bc55 commit 0be2204

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spec/mysql2/client_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -382,24 +382,24 @@ def run_gc
382382

383383
it "should expect connect_timeout to be a positive integer" do
384384
expect {
385-
Mysql2::Client.new(:connect_timeout => -1)
385+
Mysql2::Client.new(DatabaseCredentials['root'].merge(:connect_timeout => -1))
386386
}.to raise_error(Mysql2::Error)
387387
end
388388

389389
it "should expect read_timeout to be a positive integer" do
390390
expect {
391-
Mysql2::Client.new(:read_timeout => -1)
391+
Mysql2::Client.new(DatabaseCredentials['root'].merge(:read_timeout => -1))
392392
}.to raise_error(Mysql2::Error)
393393
end
394394

395395
it "should expect write_timeout to be a positive integer" do
396396
expect {
397-
Mysql2::Client.new(:write_timeout => -1)
397+
Mysql2::Client.new(DatabaseCredentials['root'].merge(:write_timeout => -1))
398398
}.to raise_error(Mysql2::Error)
399399
end
400400

401401
it "should allow nil read_timeout" do
402-
client = Mysql2::Client.new(:read_timeout => nil)
402+
client = Mysql2::Client.new(DatabaseCredentials['root'].merge(:read_timeout => nil))
403403

404404
expect(client.read_timeout).to be_nil
405405
end

0 commit comments

Comments
 (0)