Skip to content

Set a default EnvUtil.timeout_scale for TruffleRuby to help avoid transient failures#23

Merged
eregon merged 1 commit intoruby:masterfrom
eregon:default-timeout_scale-on-truffleruby
Apr 16, 2026
Merged

Set a default EnvUtil.timeout_scale for TruffleRuby to help avoid transient failures#23
eregon merged 1 commit intoruby:masterfrom
eregon:default-timeout_scale-on-truffleruby

Conversation

@eregon
Copy link
Copy Markdown
Member

@eregon eregon commented Apr 15, 2026

No description provided.

@eregon eregon requested a review from nobu April 15, 2026 21:45
@eregon
Copy link
Copy Markdown
Member Author

eregon commented Apr 15, 2026

Given

FileUtils.cp "../ruby/tool/lib/envutil.rb", "./lib"
I guess I should make a PR to ruby/ruby too:
ruby/ruby#16754

Comment thread lib/envutil.rb
# Setting a default timeout scale helps avoid transient failures for tests relying on timeouts.
# We choose 10 because it is the same number used in CRuby CI on macOS:
# https://github.com/ruby/ruby/blob/9d46b0c735877f152a0b4b16b8153c6f395dee28/.github/workflows/macos.yml#L133
self.timeout_scale = 10
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
self.timeout_scale = 10
@timeout_scale = 10

Alternatively, call self.timeout_scale = 10 in the regular class body (outside the singleton class body). :)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Or EnvUtil.timeout_scale = 10.

@nevans
Copy link
Copy Markdown

nevans commented Apr 16, 2026

@eregon FYI, this is breaking net-imap's truffleruby builds.

@eregon
Copy link
Copy Markdown
Member Author

eregon commented Apr 17, 2026

@nevans Sorry about that, will make a fix ASAP.
I thought I should maybe test this but this repo doesn't have any CI unfortunately.
For net-imap maybe you could use the latest release of test-unit-ruby-core instead of master?

eregon added a commit to eregon/test-unit-ruby-core that referenced this pull request Apr 17, 2026
eregon added a commit that referenced this pull request Apr 17, 2026
@eregon
Copy link
Copy Markdown
Member Author

eregon commented Apr 17, 2026

Fix in #24 and I tested locally it fixes it for net-imap with gem "test-unit-ruby-core", path: "/home/eregon/code/test-unit-ruby-core".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants