8000 Fix flaky TestSetTraceFunc#test_remove_in_trace by filtering trace ev… · ruby/ruby@c06fbb1 · GitHub
[go: up one dir, main page]

Skip to content

Commit c06fbb1

Browse files
ono-maxmame
authored andcommitted
Fix flaky TestSetTraceFunc#test_remove_in_trace by filtering trace events
1 parent abc04e8 commit c06fbb1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/ruby/test_settracefunc.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,9 @@ def test_remove_in_trace
456456
bug3921 = '[ruby-dev:42350]'
457457
ok = false
458458
func = lambda{|e, f, l, i, b, k|
459+
# In parallel testing, unexpected events like IO operations may be traced,
460+
# so we filter out events here.
461+
next unless f == __FILE__
459462
set_trace_func(nil)
460463
ok = eval("self", b)
461464
}

0 commit comments

Comments
 (0)
0