Disable maintenance daemon for cleanup test (#6551)

Disabling the cleanup in maintenance daemon, to prevent a flaky test.
pull/6545/head
Ahmet Gedemenli 2022-12-07 20:28:55 +03:00 committed by GitHub
parent 1e415bb1c3
commit 989a3b54c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 0 deletions

View File

@ -295,6 +295,14 @@ SELECT citus.mitmproxy('conn.allow()');
CALL citus_cleanup_orphaned_resources();
NOTICE: cleaned up 4 orphaned resources
-- disable maintenance daemon cleanup, to prevent the flaky test
ALTER SYSTEM SET citus.defer_shard_delete_interval TO -1;
SELECT pg_reload_conf();
pg_reload_conf
---------------------------------------------------------------------
t
(1 row)
-- failure on dropping subscription
SELECT citus.mitmproxy('conn.onQuery(query="^DROP SUBSCRIPTION").killall()');
mitmproxy
@ -326,6 +334,14 @@ SELECT COUNT(*)
1
(1 row)
-- reset back
ALTER SYSTEM RESET citus.defer_shard_delete_interval;
SELECT pg_reload_conf();
pg_reload_conf
---------------------------------------------------------------------
t
(1 row)
-- cleanup leftovers
-- then, verify we don't see any error for already dropped subscription
SET client_min_messages TO WARNING;

View File

@ -125,6 +125,10 @@ SELECT master_move_shard_placement(101, 'localhost', :worker_1_port, 'localhost'
SELECT citus.mitmproxy('conn.allow()');
CALL citus_cleanup_orphaned_resources();
-- disable maintenance daemon cleanup, to prevent the flaky test
ALTER SYSTEM SET citus.defer_shard_delete_interval TO -1;
SELECT pg_reload_conf();
-- failure on dropping subscription
SELECT citus.mitmproxy('conn.onQuery(query="^DROP SUBSCRIPTION").killall()');
SELECT master_move_shard_placement(101, 'localhost', :worker_1_port, 'localhost', :worker_2_proxy_port);
@ -137,6 +141,10 @@ SELECT COUNT(*)
$$DROP SUBSCRIPTION citus_shard_move_subscription_10_15$$)
WHERE success AND result = 'DROP SUBSCRIPTION';
-- reset back
ALTER SYSTEM RESET citus.defer_shard_delete_interval;
SELECT pg_reload_conf();
-- cleanup leftovers
-- then, verify we don't see any error for already dropped subscription
SET client_min_messages TO WARNING;