Skip to content

Commit 87ab5c7

Browse files
committed
Debug read_each Ci failure
1 parent 2714c8b commit 87ab5c7

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

Diff for: .github/workflows/test.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ jobs:
3232
- name: Compile C-extension
3333
run: bundle exec rake compile
3434
- 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

Diff for: test/test_um.rb

+9
Original file line numberDiff line numberDiff line change
@@ -284,23 +284,32 @@ def test_read_each_raising_2
284284
bgid = machine.setup_buffer_ring(4096, 1024)
285285
assert_equal 0, bgid
286286

287+
p 11
287288
w << 'foo'
289+
p 12
288290

289291
e = nil
290292
begin
293+
p 13
291294
machine.read_each(r.fileno, bgid) do |buf|
295+
p [14, buf]
292296
raise 'hi'
293297
end
294298
rescue => e
299+
p [15, e]
295300
end
296301

302+
p 16
297303
assert_kind_of RuntimeError, e
298304
assert_equal 'hi', e.message
299305

306+
p 17
300307
# since the write fd is still open, the read_each impl is supposed to cancel
301308
# the op, which is done asynchronously.
302309
assert_equal 1, machine.pending_count
310+
p 18
303311
machine.snooze
312+
p 19
304313
assert_equal 0, machine.pending_count
305314
end
306315

0 commit comments

Comments
 (0)