Skip to content

Fix test_connection_pool_starts_reaper_in_fork to skip instead of fail when subprocess is killed by a signal #56925

@ruyrocha

Description

@ruyrocha

Steps to reproduce

cd activerecord
ARCONN=postgresql bin/test test/cases/reaper_test.rb \
  -i '/^ActiveRecord::ConnectionAdapters::ReaperTest#test_connection_pool_starts_reaper_in_fork$/' \
  -v

Expected behavior

When the forked subprocess is killed by a signal, the test should skip with a descriptive message rather than reporting a hard assertion failure, since a signal-terminated process indicates a platform or driver crash rather than a reaper logic failure.

Actual behavior

When the forked subprocess crashes with SIGSEGV (e.g. due to pg 1.6.3 + Ruby 4.0.0 arm64-darwin calling into CFPreferences via libpq's GSS/Kerberos credential probe inside a forked process), the test reports a misleading hard failure:

Failure:
ActiveRecord::ConnectionAdapters::ReaperTest#test_connection_pool_starts_reaper_in_fork:
Expected #<Process::Status: pid 35792 SIGSEGV (signal 11)> to be success?.

The subprocess never reached the reaper logic at all, so the failure says nothing about whether the reaper works correctly.

System configuration

Rails version: main

Ruby version: 4.0.0 (2025-12-25 revision 553f1675f3) +PRISM [arm64-darwin25]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions