Skip to content

Commit

Permalink
Add vaccum pg_class + pg_sleep(1) after each drop table in regression…
Browse files Browse the repository at this point in the history
… test to wait that the temporary table is really removed.
  • Loading branch information
darold committed Jun 7, 2024
1 parent cb23cc5 commit 9323178
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/expected/01_oncommitdelete.out
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,13 @@ SHOW search_path;
(1 row)

DROP TABLE t_glob_temptable1;
VACUUM pg_class;
SELECT pg_sleep(1);
pg_sleep
----------

(1 row)

-- Look at Global Temporary Table definition
SELECT nspname, relname, preserved, code FROM pgtt_schema.pg_global_temp_tables; -- should be empty
nspname | relname | preserved | code
Expand Down
7 changes: 7 additions & 0 deletions test/expected/11_after_error.out
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ SHOW search_path;
(1 row)

DROP TABLE t_glob_temptable1;
VACUUM pg_class;
SELECT pg_sleep(1);
pg_sleep
----------

(1 row)

-- Look at Global Temporary Table definition
SELECT nspname, relname, preserved, code FROM pgtt_schema.pg_global_temp_tables; -- should be empty
nspname | relname | preserved | code
Expand Down
3 changes: 3 additions & 0 deletions test/sql/01_oncommitdelete.sql
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ DROP TABLE t_glob_temptable1;
SHOW search_path;
DROP TABLE t_glob_temptable1;

VACUUM pg_class;
SELECT pg_sleep(1);

-- Look at Global Temporary Table definition
SELECT nspname, relname, preserved, code FROM pgtt_schema.pg_global_temp_tables; -- should be empty

Expand Down
3 changes: 3 additions & 0 deletions test/sql/11_after_error.sql
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ COMMIT;
SHOW search_path;
DROP TABLE t_glob_temptable1;

VACUUM pg_class;
SELECT pg_sleep(1);

-- Look at Global Temporary Table definition
SELECT nspname, relname, preserved, code FROM pgtt_schema.pg_global_temp_tables; -- should be empty

Expand Down

0 comments on commit 9323178

Please sign in to comment.