Skip to content

Commit d4d95ff

Browse files
committed
Address Ruby 3.4 frozen string warnings and improve flaky test
1 parent e9661b0 commit d4d95ff

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

test/integration/processes_lifecycle_test.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,9 @@ class ProcessesLifecycleTest < ActiveSupport::TestCase
121121
no_pause = enqueue_store_result_job("no pause")
122122
pause = enqueue_store_result_job("pause", pause: SolidQueue.shutdown_timeout + 10.second)
123123

124-
signal_process(@pid, :TERM, wait: 0.5.second)
124+
wait_while_with_timeout(1.second) { SolidQueue::ReadyExecution.count > 0 }
125+
126+
signal_process(@pid, :TERM, wait: 0.5)
125127

126128
sleep(SolidQueue.shutdown_timeout + 0.5.second)
127129

test/models/solid_queue/process_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class SolidQueue::ProcessTest < ActiveSupport::TestCase
6060
worker = SolidQueue::Worker.new(queues: "*", threads: 3, polling_interval: 0.2)
6161
hostname = "Basecamp’s-Computer"
6262

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

0 commit comments

Comments
 (0)