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

Don't run integration tests on Falcon against TruffleRuby #1839

Merged
merged 1 commit into from
Nov 15, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion test/integration_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,15 @@ def self.extend_object(obj)
super

base_port = 5000 + Process.pid % 100
Sinatra::Base.server.each_with_index do |server, index|
servers = Sinatra::Base.server.dup

# TruffleRuby doesn't support `Fiber.set_scheduler` yet
unless Fiber.respond_to?(:set_scheduler)
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately, this check also skips falcon tests on MRI Ruby <3.0

$ chruby-exec 2.7.7 -- ruby -e 'p Fiber.respond_to?(:set_scheduler)'
false

falcon has an open requirement on async, async since version 2.0 requires Ruby >=3.1.1 (https://rubygems.org/gems/async/versions/2.0.0). It should be possible to still run these tests on Ruby 2.x, don't you think @andrykonchin? It will just run falcon using async 1.x

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, so probably we should check explicitly for RUBY_ENGINE == "truffleruby" here.
TruffleRuby master has RUBY_VERSION 3.1 but doesn't support Fiber.set_scheduler yet.

Copy link
Contributor

Choose a reason for hiding this comment

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

So:

    if RUBY_ENGINE == "truffleruby" && !Fiber.respond_to?(:set_scheduler)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've prepared a PR with the fix (#1852).

warn "skip falcon server"
servers.delete('falcon')
end

servers.each_with_index do |server, index|
Server.run(server, base_port+index)
end
end
Expand Down