Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
86d4d0a
Initial check-in.
lwasylow Mar 18, 2022
f1f6d71
Tidy up code to make sure we got distinct set of expanded tests.
lwasylow Mar 19, 2022
1454221
Adding extra fields.
lwasylow Mar 23, 2022
ce4df28
Stage 3. Fixing error calls.
lwasylow Mar 29, 2022
273962b
Fixing issue with a non visible tests.
lwasylow Mar 29, 2022
a753e66
Fixing ORA-600
lwasylow Mar 30, 2022
0d8d34d
Cleanup Phase1.
lwasylow Mar 30, 2022
95ddec1
Adding tests.
lwasylow Mar 31, 2022
83dbdaa
Updating documentation.
lwasylow Mar 31, 2022
52c0307
Addresing sonar issues
lwasylow Mar 31, 2022
8f8d257
Extra tests and cleanup of old code.
lwasylow Apr 1, 2022
12be123
Adding extra tests
lwasylow Apr 1, 2022
d5ee6ca
Updating SQL to expand paths and extract suites.
lwasylow Apr 1, 2022
2db8d63
Addressing issue with reconstruct_cache knocking off other levels.
lwasylow Apr 6, 2022
d3396fe
Update tests for random order
lwasylow Apr 7, 2022
02d41a6
Removing a hash function from api into utils package which is more su…
lwasylow Apr 7, 2022
274d80a
Fixing ordering
lwasylow Apr 7, 2022
3937737
Fixing a documentation
lwasylow Apr 7, 2022
9296f38
Fixing indent
lwasylow Apr 7, 2022
6ff7f38
Peer review changes
lwasylow Apr 12, 2022
ee7a98b
Moving a SQL to be more readable.
lwasylow Apr 12, 2022
a53cefa
Apply suggestions from code review
jgebal Apr 13, 2022
011970f
Apply suggestions from code review
jgebal Apr 13, 2022
71e07f9
Merge remote-tracking branch 'origin/develop' into feature/call_tests…
jgebal Apr 15, 2022
221c2de
Address issue of not recognizing a correct nested level of suitepath.
lwasylow Apr 16, 2022
870cfe4
Merge branch 'feature/call_tests_by_part_of_name' of https://github.c…
lwasylow Apr 16, 2022
51439d8
Update documentation
lwasylow Apr 16, 2022
0fc7ff6
Fixing issue where parition by only path caused a duplicate level 1 a…
lwasylow Apr 16, 2022
647b830
Fixed issue with suites getting duplicated when running tests across …
jgebal Apr 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Moving a SQL to be more readable.
  • Loading branch information
lwasylow committed Apr 12, 2022
commit ee7a98b97357667fd7229c3f6711e4bd7cb2576c
38 changes: 25 additions & 13 deletions source/core/ut_suite_cache_manager.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -125,51 +125,63 @@ create or replace package body ut_suite_cache_manager is

Fourth SQL cover scenario where suitepath is populated with no filters
*/

--TODO: Przenies w osobny with clause z nazwami jako opis.
-- i with clause na tablice.
function expand_paths(a_schema_paths ut_path_items) return ut_path_items is
l_schema_paths ut_path_items:= ut_path_items();
begin
with paths_to_expand as (
with
schema_paths as (
select * from table(a_schema_paths)
),
paths_for_object as (
select /*+ no_parallel */ min(path) as suite_path,sp.schema_name as schema_name,nvl(c.object_name,sp.object_name) as object_name,
null as procedure_name
from table(a_schema_paths) sp left outer join ut_suite_cache c
from schema_paths sp left outer join ut_suite_cache c
on ( c.object_owner = upper(sp.schema_name)
and c.object_name like replace(upper(sp.object_name),'*','%'))
where sp.suite_path is null and sp.object_name is not null
and ( sp.procedure_name is null or sp.procedure_name = '*')
group by sp.schema_name,nvl(c.object_name,sp.object_name)
union all
),
paths_for_procedures as (
select /*+ no_parallel */ path as suite_path,sp.schema_name as schema_name,nvl(c.object_name,sp.object_name) as object_name,
nvl(c.name,sp.procedure_name) as procedure_name
from table(a_schema_paths) sp left outer join ut_suite_cache c
from schema_paths sp left outer join ut_suite_cache c
on ( c.object_owner = upper(sp.schema_name)
and c.object_name like replace(upper(sp.object_name),'*','%')
and c.name like nvl(replace(upper(sp.procedure_name),'*','%'), c.name))
where sp.suite_path is null and sp.object_name is not null
and (sp.procedure_name is not null and sp.procedure_name != '*')
union all
),
paths_for_suite_path_with_ast as (
select /*+ no_parallel */ nvl(c.path,sp.suite_path) as suite_path,sp.schema_name,sp.object_name,sp.procedure_name as procedure_name
from
table(a_schema_paths) sp left outer join ut_suite_cache c on
from schema_paths sp left outer join ut_suite_cache c on
( c.object_owner = upper(sp.schema_name)
and c.path like replace(sp.suite_path,'*','%'))
where sp.suite_path is not null and instr(sp.suite_path,'*') > 0
union all
),
straigth_suite_paths as (
select /*+ no_parallel */ sp.suite_path as suite_path,sp.schema_name,sp.object_name,sp.procedure_name as procedure_name
from table(a_schema_paths) sp
from schema_paths sp
where
(sp.suite_path is not null and instr(sp.suite_path,'*') = 0)
or
(sp.suite_path is null and sp.object_name is null)
),
all_suitepaths_together as (
select * from paths_for_object
union all
select * from paths_for_procedures
union all
select * from paths_for_suite_path_with_ast
union all
select * from straigth_suite_paths
)
select ut_path_item(schema_name,object_name,procedure_name,suite_path)
bulk collect into l_schema_paths
from
(select schema_name,object_name,procedure_name,suite_path,
row_number() over ( partition by schema_name,object_name,procedure_name,suite_path order by 1) as r_num
from paths_to_expand)
from all_suitepaths_together)
where r_num = 1 ;
return l_schema_paths;
end;
Expand Down
1 change: 0 additions & 1 deletion source/core/ut_suite_manager.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ create or replace package body ut_suite_manager is
close a_suite_data_cursor;
end reconstruct_from_cache;

--TODO: daj do public ut_suite_cache_rows i zmienic na SQL
function get_filtered_cursor(
a_unfiltered_rows in ut_suite_cache_rows,
a_skip_all_objects boolean := false
Expand Down