File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -149,10 +149,11 @@ module Concurrent
149149 } . to raise_error ( Concurrent ::ResourceLimitError )
150150 end
151151
152- it 'does not release the lock when an exception is raised' do
153- expect ( subject ) . to_not receive ( :release_read_lock ) . with ( any_args )
154- lambda do
155- subject . with_read_lock { raise StandardError }
152+ it 'releases the lock when an exception is raised' do
153+ expect ( subject ) . to receive ( :release_read_lock ) . with ( any_args )
154+ begin
155+ subject . release_read_lock { raise StandardError }
156+ rescue
156157 end
157158 end
158159 end
@@ -189,10 +190,11 @@ module Concurrent
189190 } . to raise_error ( Concurrent ::ResourceLimitError )
190191 end
191192
192- it 'does not release the lock when an exception is raised' do
193- expect ( subject ) . to_not receive ( :release_write_lock ) . with ( any_args )
194- lambda do
193+ it 'releases the lock when an exception is raised' do
194+ expect ( subject ) . to receive ( :release_write_lock ) . with ( any_args )
195+ begin
195196 subject . with_write_lock { raise StandardError }
197+ rescue
196198 end
197199 end
198200 end
You can’t perform that action at this time.
0 commit comments