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

Update JRuby in tests to 9.4.8.0 #9354

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/rspec_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- {os: ubuntu-latest, ruby: '3.1'}
- {os: ubuntu-20.04, ruby: '3.2'} # openssl 1.1.1
- {os: ubuntu-22.04, ruby: '3.2'} # openssl 3
- {os: ubuntu-latest, ruby: 'jruby-9.4.3.0'}
- {os: ubuntu-latest, ruby: 'jruby-9.4.8.0'}
- {os: windows-2019, ruby: '3.1'}
- {os: windows-2019, ruby: '3.2'} # openssl 3

Expand Down
4 changes: 1 addition & 3 deletions lib/puppet/node/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -593,9 +593,7 @@ def perform_initial_import
if file == NO_MANIFEST
empty_parse_result
elsif File.directory?(file)
# JRuby does not properly perform Dir.glob operations with wildcards, (see PUP-11788 and https://github.com/jruby/jruby/issues/7836).
# We sort the results because Dir.glob order is inconsistent in Ruby < 3 (see PUP-10115).
parse_results = Puppet::FileSystem::PathPattern.absolute(File.join(file, '**/*')).glob.select { |globbed_file| globbed_file.end_with?('.pp') }.sort.map do |file_to_parse|
parse_results = Puppet::FileSystem::PathPattern.absolute(File.join(file, '**/*.pp')).glob.map do |file_to_parse|
parser.file = file_to_parse
parser.parse
end
Expand Down
4 changes: 0 additions & 4 deletions spec/unit/file_system/path_pattern_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
require 'spec_helper'
require 'puppet_spec/files'
require 'puppet/file_system'
require 'puppet/util'

describe Puppet::FileSystem::PathPattern do
include PuppetSpec::Files
Expand Down Expand Up @@ -134,9 +133,6 @@
end

it 'globs wildcard patterns properly' do
# See PUP-11788 and https://github.com/jruby/jruby/issues/7836.
pending 'JRuby does not properly handle Dir.glob' if Puppet::Util::Platform.jruby?

dir = tmpdir('globtest')
create_file_in(dir, 'foo.pp')
create_file_in(dir, 'foo.pp.pp')
Expand Down
4 changes: 0 additions & 4 deletions spec/unit/pops/types/string_converter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,6 @@
'%.1f' => '18.0',
}.each do |fmt, result |
it "the format #{fmt} produces #{result}" do
pending("PUP-8612 %a and %A not support on JRuby") if RUBY_PLATFORM == 'java' && fmt =~ /^%[aA]$/
string_formats = { Puppet::Pops::Types::PIntegerType::DEFAULT => fmt}
expect(converter.convert(18, string_formats)).to eq(result)
end
Expand Down Expand Up @@ -410,7 +409,6 @@
'%#B' => '0B10010',
}.each do |fmt, result |
it "the format #{fmt} produces #{result}" do
pending("PUP-8612 %a and %A not support on JRuby") if RUBY_PLATFORM == 'java' && fmt =~ /^%[-.014]*[aA]$/
string_formats = { Puppet::Pops::Types::PFloatType::DEFAULT => fmt}
expect(converter.convert(18.0, string_formats)).to eq(result)
end
Expand Down Expand Up @@ -587,7 +585,6 @@
"%#Y" => 'Y',
}.each do |fmt, result |
it "the format #{fmt} produces #{result}" do
pending("PUP-8612 %a and %A not support on JRuby") if RUBY_PLATFORM == 'java' && fmt =~ /^%[aA]$/
string_formats = { Puppet::Pops::Types::PBooleanType::DEFAULT => fmt}
expect(converter.convert(true, string_formats)).to eq(result)
end
Expand Down Expand Up @@ -634,7 +631,6 @@
"%#Y" => 'N',
}.each do |fmt, result |
it "the format #{fmt} produces #{result}" do
pending("PUP-8612 %a and %A not support on JRuby") if RUBY_PLATFORM == 'java' && fmt =~ /^%[aA]$/
string_formats = { Puppet::Pops::Types::PBooleanType::DEFAULT => fmt}
expect(converter.convert(false, string_formats)).to eq(result)
end
Expand Down
Loading