diff --git a/ext/extconf.rb b/ext/extconf.rb index 99207d234..846436d8a 100644 --- a/ext/extconf.rb +++ b/ext/extconf.rb @@ -64,6 +64,12 @@ def cook_and_activate self.activate self end + + # Increase number of download retries; otherwise it fails often in CI + alias download_file_count_3 download_file + def download_file(url, full_path, count = 60) + download_file_count_3(url, full_path, count) + end end openssl_platform = with_config("openssl-platform") diff --git a/spec/helpers.rb b/spec/helpers.rb index bba0eeb86..015eccd07 100644 --- a/spec/helpers.rb +++ b/spec/helpers.rb @@ -684,7 +684,7 @@ def set_etc_hosts(hostaddr, hostname) config.filter_run_excluding( :scheduler ) if RUBY_VERSION < "3.0" || (RUBY_PLATFORM =~ /mingw|mswin/ && RUBY_VERSION < "3.1") || !Fiber.respond_to?(:scheduler) config.filter_run_excluding( :scheduler_address_resolve ) if RUBY_VERSION < "3.1" config.filter_run_excluding( :ipv6 ) if Addrinfo.getaddrinfo("localhost", nil, nil, :STREAM).size < 2 - config.filter_run_excluding( :ractor ) unless defined?(Ractor) + config.filter_run_excluding( :ractor ) unless defined?(Ractor) && RUBY_VERSION >= "4" begin PG.require_bigdecimal_without_warning rescue LoadError diff --git a/spec/pg/connection_spec.rb b/spec/pg/connection_spec.rb index d587721b3..6ed2c5112 100644 --- a/spec/pg/connection_spec.rb +++ b/spec/pg/connection_spec.rb @@ -3089,7 +3089,11 @@ def with_std_conf_strings(conn, onoff) https://www.postgresql.org/docs/current/sql-syntax-lexical.html. Should you find any syntax changes in string literals - please adjust PG::Connection::PLACEHOLDER_RE constant accordingly TEXT - expect(latest_commit_info.dig(0, :sha)).to eq("45762084545ec14dbbe66ace1d69d7e89f8978ac"), error_message + expect(latest_commit_info).to be_kind_of(Array), latest_commit_info.to_s + expect(latest_commit_info[0]).to be_kind_of(Hash), latest_commit_info.to_s + expect(latest_commit_info[0][:sha]).to eq("45762084545ec14dbbe66ace1d69d7e89f8978ac"), error_message + rescue SocketError, JSON::ParserError => err + skip "cannot access PostgreSQL git repository: #{err}" end describe "default type map" do