Skip to content

Commit 5f07724

Browse files
authored
Merge pull request #740 from larskanis/ci-improve
CI: Improve failure rate of CI runs
2 parents efc5b3a + 75ec5e3 commit 5f07724

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

ext/extconf.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,12 @@ def cook_and_activate
6464
self.activate
6565
self
6666
end
67+
68+
# Increase number of download retries; otherwise it fails often in CI
69+
alias download_file_count_3 download_file
70+
def download_file(url, full_path, count = 60)
71+
download_file_count_3(url, full_path, count)
72+
end
6773
end
6874

6975
openssl_platform = with_config("openssl-platform")

spec/helpers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ def set_etc_hosts(hostaddr, hostname)
684684
config.filter_run_excluding( :scheduler ) if RUBY_VERSION < "3.0" || (RUBY_PLATFORM =~ /mingw|mswin/ && RUBY_VERSION < "3.1") || !Fiber.respond_to?(:scheduler)
685685
config.filter_run_excluding( :scheduler_address_resolve ) if RUBY_VERSION < "3.1"
686686
config.filter_run_excluding( :ipv6 ) if Addrinfo.getaddrinfo("localhost", nil, nil, :STREAM).size < 2
687-
config.filter_run_excluding( :ractor ) unless defined?(Ractor)
687+
config.filter_run_excluding( :ractor ) unless defined?(Ractor) && RUBY_VERSION >= "4"
688688
begin
689689
PG.require_bigdecimal_without_warning
690690
rescue LoadError

spec/pg/connection_spec.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3089,7 +3089,11 @@ def with_std_conf_strings(conn, onoff)
30893089
https://www.postgresql.org/docs/current/sql-syntax-lexical.html. Should you find any syntax changes in
30903090
string literals - please adjust PG::Connection::PLACEHOLDER_RE constant accordingly
30913091
TEXT
3092-
expect(latest_commit_info.dig(0, :sha)).to eq("45762084545ec14dbbe66ace1d69d7e89f8978ac"), error_message
3092+
expect(latest_commit_info).to be_kind_of(Array), latest_commit_info.to_s
3093+
expect(latest_commit_info[0]).to be_kind_of(Hash), latest_commit_info.to_s
3094+
expect(latest_commit_info[0][:sha]).to eq("45762084545ec14dbbe66ace1d69d7e89f8978ac"), error_message
3095+
rescue SocketError, JSON::ParserError => err
3096+
skip "cannot access PostgreSQL git repository: #{err}"
30933097
end
30943098

30953099
describe "default type map" do

0 commit comments

Comments
 (0)