Backport(v1.16) test: fix Sigdump tests failure (#4846) #4850
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Which issue(s) this PR fixes:
What this PR does / why we need it:
Sigdump.dump iterates ObjectSpace.
If there are DoubleDefinition objects of RR, it can set some expectations of RR unexpectedly.
It can cause test failure.
By doing GC, we can remove DoubleDefinition objects made in other tests.
See #4063
(...)/sigdump-0.2.5/lib/sigdump.rb:76:in
block in dump_object_count' (...)/sigdump-0.2.5/lib/sigdump.rb:75:in
each_object'(...)/sigdump-0.2.5/lib/sigdump.rb:75:in
dump_object_count' (...)/sigdump-0.2.5/lib/sigdump.rb:18:in
block in dump'(...)/sigdump-0.2.5/lib/sigdump.rb:138:in
open' (...)/sigdump-0.2.5/lib/sigdump.rb:138:in
_open_dump_path'(...)/sigdump-0.2.5/lib/sigdump.rb:14:in
dump' (...)/fluentd/fluentd/lib/fluent/supervisor.rb:1097:in
dump_non_windows'(...)/fluentd/fluentd/lib/fluent/supervisor.rb:997:in
block in install_main_process_signal_handlers' (...)/fluentd/fluentd/test/test_supervisor.rb:270:in
kill'(...)/fluentd/fluentd/test/test_supervisor.rb:270:in `test_cont_in_main_process_signal_handlers'
267: sv = Fluent::Supervisor.new({})
268: sv.send(:install_main_process_signal_handlers)
269:
=> 270: Process.kill :CONT, Process.pid
271:
272: sleep 1
273:
Docs Changes:
Not needed.
Release Note:
Not needed.