mirror of https://github.com/citusdata/citus.git
Test worker_cleanup_job_schema_cache actually drops schemas
parent
8979fd038b
commit
b301cf628a
|
@ -5,6 +5,31 @@ SET citus.next_shard_id TO 1060000;
|
||||||
\set JobId 401010
|
\set JobId 401010
|
||||||
\set CompletedTaskId 801107
|
\set CompletedTaskId 801107
|
||||||
\set RunningTaskId 801108
|
\set RunningTaskId 801108
|
||||||
|
-- Test worker_cleanup_job_schema_cache
|
||||||
|
SELECT * FROM task_tracker_assign_task(2, 2, '');
|
||||||
|
task_tracker_assign_task
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT count(*) FROM pg_catalog.pg_namespace WHERE nspname = 'pg_merge_job_0002';
|
||||||
|
count
|
||||||
|
-------
|
||||||
|
1
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT worker_cleanup_job_schema_cache();
|
||||||
|
worker_cleanup_job_schema_cache
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
(1 row)
|
||||||
|
|
||||||
|
SELECT count(*) FROM pg_catalog.pg_namespace WHERE nspname = 'pg_merge_job_0002';
|
||||||
|
count
|
||||||
|
-------
|
||||||
|
0
|
||||||
|
(1 row)
|
||||||
|
|
||||||
-- We assign two tasks to the task tracker. The first task should complete and
|
-- We assign two tasks to the task tracker. The first task should complete and
|
||||||
-- the second task should continue to keep running.
|
-- the second task should continue to keep running.
|
||||||
SELECT task_tracker_assign_task(:JobId, :CompletedTaskId,
|
SELECT task_tracker_assign_task(:JobId, :CompletedTaskId,
|
||||||
|
|
|
@ -10,6 +10,12 @@ SET citus.next_shard_id TO 1060000;
|
||||||
\set CompletedTaskId 801107
|
\set CompletedTaskId 801107
|
||||||
\set RunningTaskId 801108
|
\set RunningTaskId 801108
|
||||||
|
|
||||||
|
-- Test worker_cleanup_job_schema_cache
|
||||||
|
SELECT * FROM task_tracker_assign_task(2, 2, '');
|
||||||
|
SELECT count(*) FROM pg_catalog.pg_namespace WHERE nspname = 'pg_merge_job_0002';
|
||||||
|
SELECT worker_cleanup_job_schema_cache();
|
||||||
|
SELECT count(*) FROM pg_catalog.pg_namespace WHERE nspname = 'pg_merge_job_0002';
|
||||||
|
|
||||||
-- We assign two tasks to the task tracker. The first task should complete and
|
-- We assign two tasks to the task tracker. The first task should complete and
|
||||||
-- the second task should continue to keep running.
|
-- the second task should continue to keep running.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue