File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 6
6
# Note that changes in the inspected code, or installation of new
7
7
# versions of RuboCop, may require this file to be generated again.
8
8
9
- # Offense count: 2
10
- Lint/AmbiguousBlockAssociation :
11
- Exclude :
12
- - ' spec/mysql2/client_spec.rb'
13
-
14
9
# Offense count: 2
15
10
# Cop supports --auto-correct.
16
11
Lint/UnifiedInteger :
Original file line number Diff line number Diff line change @@ -165,6 +165,7 @@ def run_gc
165
165
end
166
166
167
167
it "should terminate connections when calling close" do
168
+ # rubocop:disable Lint/AmbiguousBlockAssociation
168
169
expect {
169
170
client = Mysql2 ::Client . new ( DatabaseCredentials [ 'root' ] )
170
171
connection_id = client . thread_id
@@ -182,10 +183,12 @@ def run_gc
182
183
} . to_not change {
183
184
@client . query ( "SHOW STATUS LIKE 'Aborted_%'" ) . to_a
184
185
}
186
+ # rubocop:enable Lint/AmbiguousBlockAssociation
185
187
end
186
188
187
189
it "should not leave dangling connections after garbage collection" do
188
190
run_gc
191
+ # rubocop:disable Lint/AmbiguousBlockAssociation
189
192
expect {
190
193
expect {
191
194
10 . times do
@@ -200,6 +203,7 @@ def run_gc
200
203
@client . query ( "SHOW STATUS LIKE 'Aborted_%'" ) . to_a +
201
204
@client . query ( "SHOW STATUS LIKE 'Threads_connected'" ) . to_a
202
205
}
206
+ # rubocop:enable Lint/AmbiguousBlockAssociation
203
207
end
204
208
205
209
context "#automatic_close" do
You can’t perform that action at this time.
0 commit comments