Fix flaky test and checkstyle

pull/7286/head
ivyazmitinov 2024-06-19 15:02:52 +02:00
parent 028702e6c2
commit f584ecc1aa
3 changed files with 28 additions and 23 deletions

View File

@ -1068,6 +1068,7 @@ MaintenanceDaemonShmemExit(int code, Datum arg)
MaintenanceDaemonDBData *myDbData = (MaintenanceDaemonDBData *)
hash_search(MaintenanceDaemonDBHash, &databaseOid,
HASH_REMOVE, NULL);
/* Workaround for -Werror=unused-variable */
(void) myDbData;
Assert(myDbData->workerPid == MyProcPid);

View File

@ -373,11 +373,6 @@ $$;
-- Cleanup
\c - - - :master_port
SELECT $definition$
ALTER SYSTEM RESET citus.recover_2pc_interval;
ALTER SYSTEM RESET citus.distributed_deadlock_detection_factor;
ALTER SYSTEM RESET citus.max_maintenance_shared_pool_size;
SELECT pg_reload_conf();
DO
$do$
DECLARE
@ -499,45 +494,52 @@ SELECT $definition$
DROP DATABASE db98 WITH (FORCE);
DROP DATABASE db99 WITH (FORCE);
DROP DATABASE db100 WITH (FORCE);
SELECT count(*)
SELECT count(*) = 0 as all_databases_dropped
FROM pg_database
WHERE datname LIKE 'db%';
ALTER SYSTEM RESET citus.recover_2pc_interval;
ALTER SYSTEM RESET citus.distributed_deadlock_detection_factor;
ALTER SYSTEM RESET citus.max_maintenance_shared_pool_size;
SELECT pg_reload_conf();
$definition$ AS cleanup
\gset
:cleanup
pg_reload_conf
all_databases_dropped
---------------------------------------------------------------------
t
(1 row)
count
pg_reload_conf
---------------------------------------------------------------------
0
t
(1 row)
\c - - - :worker_1_port
:cleanup
pg_reload_conf
all_databases_dropped
---------------------------------------------------------------------
t
(1 row)
count
pg_reload_conf
---------------------------------------------------------------------
0
t
(1 row)
\c - - - :worker_2_port
:cleanup
all_databases_dropped
---------------------------------------------------------------------
t
(1 row)
pg_reload_conf
---------------------------------------------------------------------
t
(1 row)
count
---------------------------------------------------------------------
0
(1 row)
\c - - - :master_port
DROP EXTENSION IF EXISTS dblink;

View File

@ -326,11 +326,6 @@ $$;
\c - - - :master_port
SELECT $definition$
ALTER SYSTEM RESET citus.recover_2pc_interval;
ALTER SYSTEM RESET citus.distributed_deadlock_detection_factor;
ALTER SYSTEM RESET citus.max_maintenance_shared_pool_size;
SELECT pg_reload_conf();
DO
$do$
DECLARE
@ -452,9 +447,16 @@ SELECT $definition$
DROP DATABASE db98 WITH (FORCE);
DROP DATABASE db99 WITH (FORCE);
DROP DATABASE db100 WITH (FORCE);
SELECT count(*)
SELECT count(*) = 0 as all_databases_dropped
FROM pg_database
WHERE datname LIKE 'db%';
ALTER SYSTEM RESET citus.recover_2pc_interval;
ALTER SYSTEM RESET citus.distributed_deadlock_detection_factor;
ALTER SYSTEM RESET citus.max_maintenance_shared_pool_size;
SELECT pg_reload_conf();
$definition$ AS cleanup
\gset