Skip to content

Commit fa07739

Browse files
committed
Always give the GC some time, not just on Rubinius
1 parent 62b6ccc commit fa07739

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/mysql2/client_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def connect *args
109109

110110
it "should not leave dangling connections after garbage collection" do
111111
GC.start
112-
sleep 1 if defined? Rubinius # Let the rbx GC thread do its work
112+
sleep 0.300 # Let GC do its work
113113
client = Mysql2::Client.new(DatabaseCredentials['root'])
114114
before_count = client.query("SHOW STATUS LIKE 'Threads_connected'").first['Value'].to_i
115115

@@ -120,7 +120,7 @@ def connect *args
120120
after_count.should == before_count + 10
121121

122122
GC.start
123-
sleep 1 if defined? Rubinius # Let the rbx GC thread do its work
123+
sleep 0.300 # Let GC do its work
124124
final_count = client.query("SHOW STATUS LIKE 'Threads_connected'").first['Value'].to_i
125125
final_count.should == before_count
126126
end

0 commit comments

Comments
 (0)