diff --git a/tests/sql/cron_run_jobs.sql b/tests/sql/cron_run_jobs.sql index 8b733d9..f644899 100644 --- a/tests/sql/cron_run_jobs.sql +++ b/tests/sql/cron_run_jobs.sql @@ -15,7 +15,12 @@ select current_database(); \echo 'Check the number of process pending' -- Should be 24 SELECT count(*) as jobs from public.process_queue pq where pq.processed is null; ---set role scheduler +-- Switch to the scheduler role +--\echo 'Switch to the scheduler role' +--SET ROLE scheduler; +-- Should be 24 +SELECT count(*) as jobs from public.process_queue pq where pq.processed is null; +-- Run the cron jobs SELECT public.run_cron_jobs(); -- Check any pending job SELECT count(*) as any_pending_jobs from public.process_queue pq where pq.processed is null; diff --git a/tests/sql/cron_run_jobs.sql.output b/tests/sql/cron_run_jobs.sql.output index 3facc67..ebc42d8 100644 --- a/tests/sql/cron_run_jobs.sql.output +++ b/tests/sql/cron_run_jobs.sql.output @@ -9,6 +9,9 @@ Check the number of process pending -[ RECORD 1 ] jobs | 26 +-[ RECORD 1 ] +jobs | 26 + -[ RECORD 1 ]-+- run_cron_jobs |