Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c66b4d7

Browse files
committed
Assuring that no locks are held on temp tables after test run is finished and transaction is committed.
1 parent ae3326f commit c66b4d7

5 files changed

Lines changed: 5 additions & 6 deletions

File tree

source/core/coverage/ut_coverage_helper.pkb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ create or replace package body ut_coverage_helper is
4343
procedure cleanup_tmp_table is
4444
pragma autonomous_transaction;
4545
begin
46-
null;
4746
execute immediate 'truncate table ut_coverage_sources_tmp';
4847
commit;
4948
end;

source/core/ut_utils.pkb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,7 @@ create or replace package body ut_utils is
543543
procedure read_cache_to_dbms_output is
544544
l_lines_data sys_refcursor;
545545
l_lines ut_varchar2_rows;
546-
c_lines_limit constant integer := 100;
546+
c_lines_limit constant integer := 1000;
547547
pragma autonomous_transaction;
548548
begin
549549
open l_lines_data for select text from ut_dbms_output_cache order by seq_no;
@@ -558,7 +558,7 @@ create or replace package body ut_utils is
558558
end loop;
559559
exit when l_lines_data%notfound;
560560
end loop;
561-
delete from ut_dbms_output_cache;
561+
execute immediate 'truncate table ut_dbms_output_cache';
562562
commit;
563563
end;
564564

source/expectations/data_values/ut_compound_data_diff_tmp.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ create global temporary table ut_compound_data_diff_tmp(
2323
constraint ut_compound_data_diff_tmp_chk check(
2424
item_no is not null
2525
)
26-
) on commit preserve rows;
26+
) on commit delete rows;

source/expectations/data_values/ut_compound_data_tmp.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ create global temporary table ut_compound_data_tmp(
1919
pk_hash raw(128),
2020
duplicate_no integer,
2121
constraint ut_cmp_data_tmp_hash_pk unique (data_id, item_no, duplicate_no)
22-
) on commit preserve rows;
22+
) on commit delete rows;
2323
--xmltype column item_data store as binary xml;

source/expectations/data_values/ut_json_data_diff_tmp.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ create global temporary table ut_json_data_diff_tmp(
2424
exp_json_type varchar2(2000),
2525
exp_access_path varchar2(4000),
2626
exp_parent_path varchar2(4000)
27-
) on commit preserve rows;
27+
) on commit delete rows;

0 commit comments

Comments
 (0)