Skip to content

Add ability to run tests by part of a name. #1203

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Apr 23, 2022
Merged
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
Addressing issue with reconstruct_cache knocking off other levels.
Solution was to introduce a sort order that work from bottom to top.
  • Loading branch information
lwasylow committed Apr 6, 2022
commit 2db8d635765b2c8e0d4d891a28bfce4d3d3f10ca
54 changes: 44 additions & 10 deletions source/core/ut_suite_cache_manager.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,10 @@ create or replace package body ut_suite_cache_manager is
s.y, null, s.z
) as obj
from logical_suite_data s
),
items as (
select obj from suite_items
union all
select obj from logical_suites
)
select /*+ no_parallel */ c.obj
from items c
order by c.obj.object_owner,{:random_seed:}]';
select /*+ no_parallel */obj from suite_items
union all
select /*+ no_parallel */ obj from logical_suites]';

function get_missing_cache_objects(a_object_owner varchar2) return ut_varchar2_rows is
l_result ut_varchar2_rows;
Expand Down Expand Up @@ -293,6 +288,43 @@ create or replace package body ut_suite_cache_manager is
return l_suite_tags;
end;

/*
We will sort a suites in hierarchical structure.
Sorting from bottom to top so when we consolidate
we will go in proper order.
For random seed we will add an extra sort that can be null
*/
procedure sort_and_randomize_tests(
a_suite_rows in out ut_suite_cache_rows,
a_random_seed positive := null)
is
l_suite_rows ut_suite_cache_rows;
begin
with
extract_parent_child as (
select s.path, substr(s.path,1,instr(s.path,'.',-1,1)-1) as parent_path,s.object_owner,s.line_no,a_random_seed random_seed
from table(a_suite_rows) s),
t1(path,parent_path,object_owner,line_no,random_seed) as (
--Anchor memeber
select s.path, parent_path,s.object_owner,s.line_no,random_seed
from extract_parent_child s
where parent_path is null
union all
--Recursive member
select t2.path, t2.parent_path,t2.object_owner,t2.line_no,t2.random_seed
from t1,extract_parent_child t2
where t2.parent_path = t1.path
and t1.object_owner = t2.object_owner)
search depth first by line_no desc,random_seed set order1
select value(i) as obj
bulk collect into l_suite_rows
from t1 c
join table(a_suite_rows) i on i.object_owner = c.object_owner and i.path = c.path
order by order1 desc;

a_suite_rows := l_suite_rows;
end;

/*
* Public code
*/
Expand All @@ -308,6 +340,7 @@ create or replace package body ut_suite_cache_manager is
a_tags ut_varchar2_rows := null
) return ut_suite_cache_rows is
l_results ut_suite_cache_rows := ut_suite_cache_rows();
l_results2 ut_suite_cache_rows := ut_suite_cache_rows();
l_suite_items ut_suite_cache_rows := ut_suite_cache_rows();
l_schema_paths ut_path_items;
l_tags ut_varchar2_rows := coalesce(a_tags,ut_varchar2_rows());
Expand All @@ -316,7 +349,6 @@ create or replace package body ut_suite_cache_manager is

l_schema_paths := a_schema_paths;
l_sql := gc_get_bulk_cache_suite_sql;
l_sql := replace(l_sql,'{:random_seed:}',get_random_seed_sql(a_random_seed));
l_suite_items := get_suite_items(a_schema_paths);
if l_tags.count > 0 then
l_suite_items := get_tags_suites(l_suite_items,l_tags);
Expand All @@ -325,7 +357,9 @@ create or replace package body ut_suite_cache_manager is

execute immediate l_sql
bulk collect into l_results
using l_suite_items, a_random_seed;
using l_suite_items;

sort_and_randomize_tests(l_results,a_random_seed);
return l_results;
end;

Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy