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
Run tests on TruffleRuby, all tests pass now #2198
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
e804787
Support skip_on :truffleruby
eregon 8b060d9
Remove unused variable declaration
eregon f7f1f0c
Properly skip tests which need fork
eregon 4069ec8
Improve NO_FORK_MSG
eregon 2c8a1e4
Keep the Tempfile instances alive in test_redirect_io.rb
eregon 5166a47
Use a better way to find a free port
eregon e461d1e
Read directly from the socket in #read_and_drop
eregon e9ce579
TruffleRuby should pass the CI now, remove from allowed failures
eregon 4ed3e53
Use a timeout of 120 for all non-MRI implementations
eregon e3706b5
Fix check for cluster mode in integration tests
eregon 63d3fc2
Improve integration tests to fail more clearly if the pid file does n…
eregon 2285288
Make integration tests more robust
eregon d7c5cc2
Add skips for unreliable or racy tests
eregon ae98fa9
Add ChangeLog entry
eregon 646d73a
No need to run RuboCop on non-MRI implementations
eregon File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,15 +43,10 @@ def hit(uris) | |
end | ||
|
||
module UniquePort | ||
@port = 3211 | ||
@mutex = Mutex.new | ||
|
||
def self.call | ||
@mutex.synchronize { | ||
@port += 1 | ||
@port = 3307 if @port == 3306 # MySQL on Actions | ||
@port | ||
} | ||
TCPServer.open('127.0.0.1', 0) do |server| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👏 |
||
server.connect_address.ip_port | ||
end | ||
end | ||
end | ||
|
||
|
@@ -62,7 +57,7 @@ class TestTookTooLong < Timeout::Error | |
end | ||
|
||
def run(*) | ||
::Timeout.timeout(Puma.jruby? ? 120 : 60, TestTookTooLong) { super } | ||
::Timeout.timeout(RUBY_ENGINE == 'ruby' ? 60 : 120, TestTookTooLong) { super } | ||
end | ||
end | ||
|
||
|
@@ -78,7 +73,7 @@ module TestSkips | |
# usage: skip NO_FORK_MSG unless HAS_FORK | ||
# windows >= 2.6 fork is not defined, < 2.6 fork raises NotImplementedError | ||
HAS_FORK = ::Process.respond_to? :fork | ||
NO_FORK_MSG = "Kernel.fork isn't available on the #{RUBY_PLATFORM} platform" | ||
NO_FORK_MSG = "Kernel.fork isn't available on #{RUBY_ENGINE} on #{RUBY_PLATFORM}" | ||
|
||
# socket is required by puma | ||
# usage: skip UNIX_SKT_MSG unless UNIX_SKT_EXIST | ||
|
@@ -99,11 +94,11 @@ def skip_unless_signal_exist?(sig, bt: caller) | |
# optional suffix kwarg is appended to the skip message | ||
# optional suffix bt should generally not used | ||
def skip_on(*engs, suffix: '', bt: caller) | ||
skip_msg = false | ||
engs.each do |eng| | ||
skip_msg = case eng | ||
when :darwin then "Skipped on darwin#{suffix}" if RUBY_PLATFORM[/darwin/] | ||
when :jruby then "Skipped on JRuby#{suffix}" if Puma.jruby? | ||
when :truffleruby then "Skipped on TruffleRuby#{suffix}" if RUBY_ENGINE == "truffleruby" | ||
when :windows then "Skipped on Windows#{suffix}" if Puma.windows? | ||
when :ci then "Skipped on ENV['CI']#{suffix}" if ENV["CI"] | ||
when :no_bundler then "Skipped w/o Bundler#{suffix}" if !defined?(Bundler) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For the record, this might be related to a bug in OpenSSL, mentioned in ruby/openssl#355 (comment)
Anyway, it seems safer to not call to SSL anymore if we are in such a state, as this commit does.