Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stabilize test_latest_gc_info_need_major_by #7895

Merged
merged 1 commit into from
Jun 2, 2023

Conversation

casperisfine
Copy link
Contributor

Fix:

    1) Failure:
  TestGc#test_latest_gc_info_need_major_by [/home/runner/work/ruby/ruby/src/test/ruby/test_gc.rb:266]:
  <nil> expected to not be nil.

GC.stat(:major_gc_count) can be bumped while GC.latest_gc_info(:need_major_by) is still nil.

@ioquatix @peterzhu2118

Fix:
```
    1) Failure:
  TestGc#test_latest_gc_info_need_major_by [/home/runner/work/ruby/ruby/src/test/ruby/test_gc.rb:266]:
  <nil> expected to not be nil.
```

`GC.stat(:major_gc_count)` can be bumped while `GC.latest_gc_info(:need_major_by)` is still nil.
Copy link
Member

@ioquatix ioquatix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Member

@peterzhu2118 peterzhu2118 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should keep an eye on CI after merging this. I worry that there could be cases where we don't pause during marking and the while loop runs forever.

@byroot byroot merged commit 22bea37 into ruby:master Jun 2, 2023
95 of 96 checks passed
@ioquatix
Copy link
Member

ioquatix commented Jun 3, 2023

Thanks everyone for your efforts!

@peterzhu2118 is there some way we could improve the test to avoid that case? What about putting an upper bound on the loop, e.g. 30 seconds or X iterations?

@peterzhu2118
Copy link
Member

I don't think there is a way to improve it. IIRC the test runner has a timeout, so we don't need to add one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants