File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff 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
@@ -204,6 +206,7 @@ class ProcessesLifecycleTest < ActiveSupport::TestCase
204206
205207 worker = find_processes_registered_as ( "Worker" ) . first
206208
209+ wait_while_with_timeout ( 1 . second ) { SolidQueue ::ReadyExecution . count > 0 }
207210 signal_process ( worker . pid , :TERM , wait : 0.1 . second )
208211
209212 # Worker is gone
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments