Skip to content

Commit

Permalink
Reduce sleeping in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
fatkodima committed May 4, 2024
1 parent 3b3dcad commit 287e67b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/integration/jobs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def each_iteration(num)
if stop_after_num && num == stop_after_num.to_i
Process.kill("TERM", Process.pid)
end
sleep(1)
sleep(0.01)
end
end

Expand Down
6 changes: 3 additions & 3 deletions test/iteration_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -432,12 +432,12 @@ def build_enumerator(cursor:)
end

def each_iteration(_num)
sleep(1)
sleep(0.01)
end
end

test "global #max_job_runtime" do
SidekiqIteration.max_job_runtime = 1.second
SidekiqIteration.max_job_runtime = 0.01
LongRunningJob.perform_inline

assert_jobs_in_queue(1)
Expand All @@ -446,7 +446,7 @@ def each_iteration(_num)
end

test "local #max_job_runtime" do
LongRunningJob.max_job_runtime = 1.second
LongRunningJob.max_job_runtime = 0.01
LongRunningJob.perform_inline

assert_jobs_in_queue(1)
Expand Down

0 comments on commit 287e67b

Please sign in to comment.