File tree 2 files changed +11
-1
lines changed
2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 32
32
- name : Compile C-extension
33
33
run : bundle exec rake compile
34
34
- name : Run tests
35
- run : bundle exec rake test
35
+ run : bundle exec ruby test/test_um.rb --name test_read_each_raising_2
36
+ # run: bundle exec rake test
Original file line number Diff line number Diff line change @@ -284,23 +284,32 @@ def test_read_each_raising_2
284
284
bgid = machine . setup_buffer_ring ( 4096 , 1024 )
285
285
assert_equal 0 , bgid
286
286
287
+ p 11
287
288
w << 'foo'
289
+ p 12
288
290
289
291
e = nil
290
292
begin
293
+ p 13
291
294
machine . read_each ( r . fileno , bgid ) do |buf |
295
+ p [ 14 , buf ]
292
296
raise 'hi'
293
297
end
294
298
rescue => e
299
+ p [ 15 , e ]
295
300
end
296
301
302
+ p 16
297
303
assert_kind_of RuntimeError , e
298
304
assert_equal 'hi' , e . message
299
305
306
+ p 17
300
307
# since the write fd is still open, the read_each impl is supposed to cancel
301
308
# the op, which is done asynchronously.
302
309
assert_equal 1 , machine . pending_count
310
+ p 18
303
311
machine . snooze
312
+ p 19
304
313
assert_equal 0 , machine . pending_count
305
314
end
306
315
You can’t perform that action at this time.
0 commit comments