Skip to content

Commit 4bb256d

Browse files
committed
Run GC from test setup
I have seen a test run where the "connected_clients" field in the INFO output changed from 15 to 3 over a statement where GC might run. This change should prevent that from happening again.
1 parent ba37268 commit 4bb256d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/helper.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,9 @@ module Generic
141141
def setup
142142
@log = StringIO.new
143143
@redis = init _new_client
144+
145+
# Run GC to make sure orphaned connections are closed.
146+
GC.start
144147
end
145148

146149
def teardown

0 commit comments

Comments
 (0)