Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ivyazmitinov committed Jun 28, 2024
1 parent 1c219fe commit f7516d7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/test/regress/citus_tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,8 @@ def initdb(self):
# happened
pgconf.write("restart_after_crash = off\n")

# prevent tests from hanging
pgconf.write("statement_timeout= '5min'\n")
os.truncate(self.hba_path, 0)
self.ssl_access("all", "trust")
self.nossl_access("all", "trust")
Expand Down
10 changes: 8 additions & 2 deletions src/test/regress/expected/global_cancel.out
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ SELECT global_pid AS maintenance_daemon_gpid
FROM pg_stat_activity psa JOIN get_all_active_transactions() gaat ON psa.pid = gaat.process_id
WHERE application_name = 'Citus Maintenance Daemon' \gset
SET client_min_messages TO ERROR;
CREATE USER global_cancel_user;
SELECT 1 FROM run_command_on_workers('CREATE USER global_cancel_user');
CREATE USER global_cancel_user NOSUPERUSER ;
SELECT 1 FROM run_command_on_workers('CREATE USER global_cancel_user NOSUPERUSER ;');
?column?
---------------------------------------------------------------------
1
Expand All @@ -66,6 +66,12 @@ SELECT 1 FROM run_command_on_workers('CREATE USER global_cancel_user');

RESET client_min_messages;
\c - global_cancel_user - :master_port
SELECT current_user;
current_user
---------------------------------------------------------------------
global_cancel_user
(1 row)

SELECT pg_typeof(:maintenance_daemon_gpid);
pg_typeof
---------------------------------------------------------------------
Expand Down
5 changes: 3 additions & 2 deletions src/test/regress/sql/global_cancel.sql
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ FROM pg_stat_activity psa JOIN get_all_active_transactions() gaat ON psa.pid = g
WHERE application_name = 'Citus Maintenance Daemon' \gset

SET client_min_messages TO ERROR;
CREATE USER global_cancel_user;
SELECT 1 FROM run_command_on_workers('CREATE USER global_cancel_user');
CREATE USER global_cancel_user NOSUPERUSER ;
SELECT 1 FROM run_command_on_workers('CREATE USER global_cancel_user NOSUPERUSER ;');
RESET client_min_messages;

\c - global_cancel_user - :master_port
SELECT current_user;

SELECT pg_typeof(:maintenance_daemon_gpid);

Expand Down

0 comments on commit f7516d7

Please sign in to comment.