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

Fix sporadic test failure #204

Merged
merged 1 commit into from
Mar 20, 2023
Merged

Commits on Mar 20, 2023

  1. Fix sporadic test failure

    If the cli_spec.rb's set_replication specs ran on macOS before
    database_replication_standby_spec.rb's register_standby_server specs,
    the former would create a $CHILD_STATUS var with a failing result. Then
    when the register_standby_server spec would run it stubs the forking
    call, but doesn't stub $CHILD_STATUS, resulting in a call to
    $CHILD_STATUS.success? which would return false.
    
    While we could change the test to also stub $CHILD_STATUS.success? to
    return true, this only works on Ruby 2.7. On Ruby 3.0 this fails with a
    modify frozen object error.
    
    Instead, what we can do is use Process.wait2 instead of
    Process.wait+$CHILD_STATUS.success? This way, we can stub the status
    object as well.
    Fryguy committed Mar 20, 2023
    Configuration menu
    Copy the full SHA
    2e404e7 View commit details
    Browse the repository at this point in the history