Skip to content

Commit

Permalink
Add sleep before #term_and_wait_for_exit
Browse files Browse the repository at this point in the history
We're expecting a callback from the ghostferry reacting to binlogs created by DataWriter, which can't be easily synchronized, since it's a goroutine inside the subprocess. Not ideal, but add a sleep to prevent cases where it doesn't happen before the TERM signal
  • Loading branch information
grodowski committed Dec 10, 2024
1 parent 2df2f43 commit 9002ed0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/integration/interrupt_resume_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ def test_interrupt_resume_inline_verifier_with_datawriter
ghostferry.on_status(Ghostferry::Status::AFTER_ROW_COPY) do
batches_written += 1
if batches_written >= 2
sleep 0.1
ghostferry.term_and_wait_for_exit
end
end
Expand Down

0 comments on commit 9002ed0

Please sign in to comment.