diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1afb1b408..1a6970a7c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -41,7 +41,7 @@ jobs: DISABLE_SPRING: 1 services: postgres: - image: postgres:14 + image: postgres:15 env: POSTGRES_USER: good_job POSTGRES_DB: good_job_test @@ -77,24 +77,24 @@ jobs: strategy: matrix: ruby: [2.6, 2.7, "3.0", 3.1, 3.2, jruby-9.3] - pg: [14] + pg: [15] include: - - ruby: "3.0" - pg: 10 - - ruby: "3.0" + - ruby: 3.2 pg: 11 - - ruby: "3.0" + - ruby: 3.2 pg: 12 - - ruby: "3.0" + - ruby: 3.2 pg: 13 - - ruby: jruby-9.3 - pg: 10 + - ruby: 3.2 + pg: 14 - ruby: jruby-9.3 pg: 11 - ruby: jruby-9.3 pg: 12 - ruby: jruby-9.3 pg: 13 + - ruby: jruby-9.3 + pg: 14 env: PGHOST: localhost PGUSER: good_job diff --git a/spec/lib/good_job/adapter_spec.rb b/spec/lib/good_job/adapter_spec.rb index d99a4d360..d0a3303a5 100644 --- a/spec/lib/good_job/adapter_spec.rb +++ b/spec/lib/good_job/adapter_spec.rb @@ -200,6 +200,20 @@ def perform context 'when execution mode async_server' do let(:adapter) { described_class.new(execution_mode: :async_server) } + before do + scheduler = instance_double(GoodJob::Scheduler) + allow(GoodJob::Scheduler).to receive(:new).and_return(scheduler) + + notifier = instance_double(GoodJob::Notifier, recipients: []) + allow(GoodJob::Notifier).to receive(:new).and_return(notifier) + + poller = instance_double(GoodJob::Poller, recipients: []) + allow(GoodJob::Poller).to receive(:new).and_return(poller) + + cron_manager = instance_double(GoodJob::CronManager) + allow(GoodJob::CronManager).to receive(:new).and_return(cron_manager) + end + context 'when Rails::Server is defined' do before do stub_const("Rails::Server", Class.new)