mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Fix flaky TestSetTraceFunc#test_remove_in_trace by filtering trace events
This commit is contained in:
parent
abc04e898b
commit
c06fbb192f
Notes:
git
2024-08-16 00:47:36 +00:00
1 changed files with 3 additions and 0 deletions
|
@ -456,6 +456,9 @@ class TestSetTraceFunc < Test::Unit::TestCase
|
|||
bug3921 = '[ruby-dev:42350]'
|
||||
ok = false
|
||||
func = lambda{|e, f, l, i, b, k|
|
||||
# In parallel testing, unexpected events like IO operations may be traced,
|
||||
# so we filter out events here.
|
||||
next unless f == __FILE__
|
||||
set_trace_func(nil)
|
||||
ok = eval("self", b)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue