Skip to content

Commit 97e2365

Browse files
author
Arthur Zakirov
committed
PGPRO-2601: Fix tests
1 parent 2a4bba3 commit 97e2365

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

expected/pg_variables.out

+2-2
Original file line numberDiff line numberDiff line change
@@ -724,14 +724,14 @@ ERROR: unrecognized variable "r3"
724724
CONTEXT: SQL statement "SELECT pgv_select('vars3', 'r3')"
725725
PL/pgSQL function inline_code_block line 3 at PERFORM
726726
-- Check that the hash table was cleaned up after rollback
727+
SET client_min_messages to 'ERROR';
727728
SELECT pgv_select('vars3', 'r1', 1);
728729
pgv_select
729730
------------
730731

731732
(1 row)
732733

733734
SELECT pgv_select('vars3', 'r1') LIMIT 2; -- warning
734-
WARNING: leaked hash_seq_search scan for hash table 0x561738129110
735735
pgv_select
736736
------------
737737
(,strNULL)
@@ -769,7 +769,7 @@ FETCH 1 in r1_cur;
769769

770770
CLOSE r1_cur;
771771
COMMIT; -- warning
772-
WARNING: leaked hash_seq_search scan for hash table 0x561738129110
772+
RESET client_min_messages;
773773
-- Clean memory after unsuccessful creation of a variable
774774
SELECT pgv_insert('vars4', 'r1', row('str1', 'str1')); -- fail
775775
ERROR: could not identify a hash function for type unknown

sql/pg_variables.sql

+2
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ $$BEGIN
206206
PERFORM pgv_select('vars3', 'r3');
207207
END$$;
208208
-- Check that the hash table was cleaned up after rollback
209+
SET client_min_messages to 'ERROR';
209210
SELECT pgv_select('vars3', 'r1', 1);
210211
SELECT pgv_select('vars3', 'r1') LIMIT 2; -- warning
211212
SELECT pgv_select('vars3', 'r1') LIMIT 2 OFFSET 2;
@@ -218,6 +219,7 @@ SELECT pgv_select('vars3', 'r1');
218219
FETCH 1 in r1_cur;
219220
CLOSE r1_cur;
220221
COMMIT; -- warning
222+
RESET client_min_messages;
221223

222224
-- Clean memory after unsuccessful creation of a variable
223225
SELECT pgv_insert('vars4', 'r1', row('str1', 'str1')); -- fail

0 commit comments

Comments
 (0)