diff options
author | Naoto Ono <[email protected]> | 2024-08-13 19:37:47 +0900 |
---|---|---|
committer | Yusuke Endoh <[email protected]> | 2024-08-16 09:47:07 +0900 |
commit | c06fbb192f61e3b7af82c0c99a062a4e3938f9aa (patch) | |
tree | f71488e6357e08cdb3222b2d958c4b753d80aaa1 | |
parent | abc04e898b627ab37fa9dd5e330f239768778d8b (diff) |
Fix flaky TestSetTraceFunc#test_remove_in_trace by filtering trace events
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11368
-rw-r--r-- | test/ruby/test_settracefunc.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/ruby/test_settracefunc.rb b/test/ruby/test_settracefunc.rb index 47cab56b51..3480ef2d4a 100644 --- a/test/ruby/test_settracefunc.rb +++ b/test/ruby/test_settracefunc.rb @@ -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) } |