Skip to content

Commit

Permalink
Address Ruby 3.4 frozen string warnings and improve flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
rosa committed Jan 28, 2025
1 parent e9661b0 commit d4d95ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion test/integration/processes_lifecycle_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ class ProcessesLifecycleTest < ActiveSupport::TestCase
no_pause = enqueue_store_result_job("no pause")
pause = enqueue_store_result_job("pause", pause: SolidQueue.shutdown_timeout + 10.second)

signal_process(@pid, :TERM, wait: 0.5.second)
wait_while_with_timeout(1.second) { SolidQueue::ReadyExecution.count > 0 }

signal_process(@pid, :TERM, wait: 0.5)

sleep(SolidQueue.shutdown_timeout + 0.5.second)

Expand Down
2 changes: 1 addition & 1 deletion test/models/solid_queue/process_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class SolidQueue::ProcessTest < ActiveSupport::TestCase
worker = SolidQueue::Worker.new(queues: "*", threads: 3, polling_interval: 0.2)
hostname = "Basecamp’s-Computer"

Socket.stub :gethostname, hostname.force_encoding("ASCII-8BIT") do
Socket.stub :gethostname, hostname.dup.force_encoding("ASCII-8BIT") do
worker.start
wait_for_registered_processes(1, timeout: 1.second)

Expand Down

0 comments on commit d4d95ff

Please sign in to comment.