Skip to content

Commit

Permalink
Speed up the test DataWriter to help with a flaky test
Browse files Browse the repository at this point in the history
Affects InterruptResumeTest#test_interrupt_resume_inline_verifier_with_datawriter. My assumption
is that ghostferry.run_expecting_interrupt was able to handle TERM before it received anything from DataWriter

test_interrupt_resume_inline_verifier_with_datawriter passed 100 consecutive times locally after this change.
  • Loading branch information
grodowski committed Dec 4, 2024
1 parent 08b4172 commit 6df01d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/helpers/data_writer_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ def start(&on_write)

until @stop_requested do
write_data(connection, &on_write)
n += 1
# Kind of makes the following race condition a bit better...
# https://github.com/Shopify/ghostferry/issues/280
sleep(0.03)
sleep(0.03) if n > 10
n += 1
end
ensure
connection.close
Expand Down

0 comments on commit 6df01d3

Please sign in to comment.