Skip to content

Commit cbe31e5

Browse files
committed
Fixed rerunability of tests
1 parent 3a66021 commit cbe31e5

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

test/core/annotations/test_annot_throws_exception.pkb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ is
77

88
l_package_spec varchar2(32737);
99
l_package_body varchar2(32737);
10-
l_drop_statment varchar2(32737);
1110
l_test_results ut3.ut_varchar2_list;
1211
begin
1312
l_package_spec := '
@@ -108,9 +107,6 @@ is
108107
select * bulk collect into l_test_results from table(ut3.ut.run(('annotated_package_with_throws')));
109108

110109
g_tests_results := ut3.ut_utils.table_to_clob(l_test_results);
111-
112-
l_drop_statment := 'drop package annotated_package_with_throws';
113-
execute immediate l_drop_statment;
114110
end;
115111

116112
procedure throws_same_annotated_except is
@@ -166,5 +162,13 @@ is
166162
ut.expect(g_tests_results).to_match('^\s*Givess failure when a exception is expected and nothing is thrown \[[\.0-9]+ sec\] \(FAILED - [0-9]+\)\s*$','m');
167163
ut.expect(g_tests_results).to_match('nothing_thrown\s*Expected one of exceptions \(-20459, -20136, -20145\) but nothing was raised.');
168164
end;
165+
166+
167+
procedure drop_test_package is
168+
pragma autonomous_transaction;
169+
begin
170+
execute immediate 'drop package annotated_package_with_throws';
171+
end;
172+
169173
end;
170174
/

test/core/annotations/test_annot_throws_exception.pks

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,9 @@ is
3232

3333
--%test(Givess failure when a exception is expected and nothing is thrown)
3434
procedure nothing_thrown;
35+
36+
--%afterall
37+
procedure drop_test_package;
38+
3539
end;
3640
/

0 commit comments

Comments
 (0)