Skip to content

Commit bffb9a3

Browse files
committed
Update rubysl-foo gems and allow time for Rubinius GC
1 parent 06bdc79 commit bffb9a3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

Gemfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,7 @@ group :development do
1616
end
1717

1818
platforms :rbx do
19-
gem 'rubysl'
19+
gem 'rubysl-rake'
20+
gem 'rubysl-drb'
21+
gem 'rubysl-bigdecimal'
2022
end

spec/mysql2/client_spec.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ def connect *args
106106

107107
it "should not leave dangling connections after garbage collection" do
108108
GC.start
109+
sleep 1 if defined? Rubinius # Let the rbx GC thread do its work
109110
client = Mysql2::Client.new(DatabaseCredentials['root'])
110111
before_count = client.query("SHOW STATUS LIKE 'Threads_connected'").first['Value'].to_i
111112

@@ -116,9 +117,9 @@ def connect *args
116117
after_count.should == before_count + 10
117118

118119
GC.start
120+
sleep 1 if defined? Rubinius # Let the rbx GC thread do its work
119121
final_count = client.query("SHOW STATUS LIKE 'Threads_connected'").first['Value'].to_i
120-
final_count.should == before_count if !defined? Rubinius
121-
final_count.should < before_count + 5 if defined? Rubinius # Cut GC some slack
122+
final_count.should == before_count
122123
end
123124

124125
it "should be able to connect to database with numeric-only name" do

0 commit comments

Comments
 (0)