10000 Release/v3.1.10 by jgebal · Pull Request #1048 · utPLSQL/utPLSQL · GitHub
[go: up one dir, main page]

Skip to content

Release/v3.1.10 #1048

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 61 commits into from
Feb 23, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
1f1828f
Updated project version to 3.1.10
jgebal Nov 10, 2019
a33b53d
Updated project version after build [skip ci]
Nov 10, 2019
a2c0a58
Update link for utPLSQL download statistics
jgebal Nov 10, 2019
52794ac
Updated project version after build [skip ci]
Nov 10, 2019
b3973d0
Fixed test dependency on user running them.
jgebal Nov 29, 2019
39d144a
Changed how savepoint name is generated.
jgebal Nov 30, 2019
4bb7a95
Added a hash of owner to the generated savepoint name.
jgebal Nov 30, 2019
f7f9692
Merge pull request #1027 from utPLSQL/feature/minor_test_fixes
jgebal Nov 30, 2019
42053b4
Updated project version after build [skip ci]
Nov 30, 2019
d654ccc
Changed the target location for published documentation.
jgebal Dec 1, 2019
090b74c
Updated project version after build [skip ci]
Dec 1, 2019
e8f4532
Skip as many %endcontext as nested %context annotations
pesse Dec 19, 2019
8df3f7d
Refactoring: Extract function, add variables for readability
pesse Dec 19, 2019
a4d92de
Refactoring: Add clarifying comment
pesse Dec 19, 2019
4d1500f
Refactoring: Move responsibility to get context name completely to ge…
pesse Dec 19, 2019
3c547ec
Fix intendation
pesse Dec 20, 2019
b4c1d72
Refactoring: Use just one return to improve readability
pesse Dec 20, 2019
86185a8
Rewrite get_endcontext_position to be much easier to understand
pesse Dec 20, 2019
89df1dd
Clarify intention of end-position, make it more visible how it's defined
pesse Dec 20, 2019
c61abfa
Get rid of several `in out nocopy` params where `in` would be sufficient
pesse Dec 20, 2019
35acf14
Not necessary to check for IS NOT NULL
pesse Dec 20, 2019
3327fc3
Fix intendation
pesse Dec 20, 2019
587f966
Merge pull request #1035 from utPLSQL/bugfix/nested_context_mixup
jgebal Dec 20, 2019
cef109b
Updated project version after build [skip ci]
Dec 20, 2019
ad0f99d
Fixed repo for publishing github docs.
jgebal Dec 22, 2019
33f5152
Updated project version after build [skip ci]
Dec 22, 2019
8e43a08
Moved validation of `--%throws` annotation values.
jgebal Dec 29, 2019
d33bd80
Updated documentation for whitespace vs null compare.
jgebal Jan 2, 2020
5510555
Fixed documentation.
jgebal Jan 3, 2020
4dea559
Merge pull request #1038 from utPLSQL/bugfix/throws_exceptions_list_p…
jgebal Jan 3, 2020
d02ac94
Changed ordering of tests for suites with context
jgebal Dec 29, 2019
0a4edaf
Test name fix
jgebal Dec 29, 2019
326e055
Added documenting comments for ordering of data from suite_cache.
jgebal Jan 3, 2020
a25b8b7
Updated project version after build [skip ci]
Jan 3, 2020
d708443
Fixed documentation typos.
jgebal Jan 4, 2020
8f38487
Merge pull request #1039 from utPLSQL/feature/update_docs_for_whitesp…
jgebal Jan 4, 2020
d9077a1
Merge pull request #1037 from utPLSQL/feature/test_ordering
jgebal Jan 4, 2020
101bcbf
Updated project version after build [skip ci]
Jan 4, 2020
1b0b8f8
Refactored expectations on compound data
jgebal Feb 15, 2020
8eac19e
Changed maven repo url.
jgebal Feb 15, 2020
d84a684
Removing maven step for obtaining Oracle jdbc drivers - those are now…
jgebal Feb 15, 2020
02ba32b
Removing `/dev/pdbs` directory
jgebal Feb 15, 2020
7363daa
Merge pull request #1044 from utPLSQL/feature/fix_maven_url
jgebal Feb 15, 2020
15d24af
Updated project version after build [skip ci]
Feb 15, 2020
ba90abf
Cleanup and refactoring of annotation cache.
jgebal Aug 5, 2019
335e420
Fixed loophole in privilege check.
jgebal Nov 12, 2019
94f9c43
Merge remote-tracking branch 'origin/develop' into feature/unify_curs…
jgebal Feb 15, 2020
054c39f
Fixed issues with new cursor-results compare query on 11g
jgebal Feb 16, 2020
b39c5be
Added additional tests for annotation cache refresh with/without DDL …
jgebal Feb 17, 2020
5eab4aa
Fixed Teamcity reporting of errors
jgebal Feb 18, 2020
641b3b4
Update install.sh
jgebal Feb 18, 2020
67c4e78
Update test_teamcity_reporter.pkb
jgebal Feb 18, 2020
9c4333e
Merge pull request #1046 from utPLSQL/feature/teamcity_error_reportin…
jgebal Feb 18, 2020
3c0351f
Updated project version after build [skip ci]
Feb 18, 2020
4bed0c4
Merge pull request #1043 from utPLSQL/feature/unify_cursor_compare_be…
jgebal Feb 18, 2020
29b6db4
Updated project version after build [skip ci]
Feb 18, 2020
5d4c33c
Removed unneeded `is_annotated` column
jgebal Feb 22, 2020
62f3154
Merge pull request #986 from utPLSQL/feature/cache_fixes
jgebal Feb 23, 2020
8e54873
Updated project version after build [skip ci]
Feb 23, 2020
a2d1638
Update `releasing.md` file
jgebal Feb 23, 2020
9034250
Updated project version after build [skip ci]
Feb 23, 2020
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
123 changes: 73 additions & 50 deletions source/expectations/data_values/ut_compound_data_helper.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,6 @@ create or replace package body ut_compound_data_helper is
|| case when a_order_enforced then q'[
--column position is not matching (both when excluded extra/missing columns as well as when they are included)
or (a_pos_nn != e_pos_nn and exp_col_pos != act_col_pos)]'
else
null
end ||q'[
order by exp_col_pos, act_col_pos]'
bulk collect into l_results using a_expected, a_actual;
Expand Down Expand Up @@ -417,73 +415,100 @@ create or replace package body ut_compound_data_helper is
l_join_xpath varchar2(32767) := ut_utils.to_xpath(a_join_by_list);
l_results tt_row_diffs;
l_sql varchar2(32767);
l_column_order varchar2(100);
begin
if a_enforce_column_order then
l_column_order := 'col_no';
else
l_column_order := 'col_name';
end if;
l_sql := q'[
with exp as (
with
exp_cols as (
select
exp_item_data, exp_data_id, item_no rn, rownum col_no, pk_value,
i.exp_item_data, i.exp_data_id, i.item_no rn, rownum col_no, i.diff_id,
s.column_value col, s.column_value.getRootElement() col_name,
nvl(s.column_value.getclobval(),empty_clob()) col_val
nvl( s.column_value.getclobval(), empty_clob() ) col_val
from (
select
exp_data_id, extract( ucd.exp_item_data, :column_path ) exp_item_data, item_no,
replace( extract( ucd.exp_item_data, :join_by ).getclobval(), chr(10) ) pk_value
from ut_compound_data_diff_tmp ucd
where diff_id = :diff_id
ucd.exp_data_id, extract( ucd.exp_item_data, :column_path ) exp_item_data,
ucd.item_no, ucd.diff_id
from ut_compound_data_diff_tmp ucd
where ucd.diff_id = :diff_id
and ucd.exp_data_id = :self_guid
) i,
table( xmlsequence( extract(i.exp_item_data,:extract_path) ) ) s
table( xmlsequence( extract( i.exp_item_data, :extract_path ) ) ) s
),
act as (
act_cols as (
select
act_item_data, act_data_id, item_no rn, rownum col_no, pk_value,
i.act_item_data, i.act_data_id, i.item_no rn, rownum col_no, i.diff_id,
s.column_value col, s.column_value.getRootElement() col_name,
nvl(s.column_value.getclobval(),empty_clob()) col_val
nvl( s.column_value.getclobval(), empty_clob() ) col_val
from (
select
act_data_id, extract( ucd.act_item_data, :column_path ) act_item_data, item_no,
replace( extract( ucd.act_item_data, :join_by ).getclobval(), chr(10) ) pk_value
from ut_compound_data_diff_tmp ucd
where diff_id = :diff_id
ucd.act_data_id, extract( ucd.act_item_data, :column_path ) act_item_data,
ucd.item_no, ucd.diff_id
from ut_compound_data_diff_tmp ucd
where ucd.diff_id = :diff_id
and ucd.act_data_id = :other_guid
) i,
table( xmlsequence( extract(i.act_item_data,:extract_path) ) ) s
table( xmlsequence( extract( i.act_item_data, :extract_path ) ) ) s
),
data_diff as (
select rn, diff_type, xmlserialize(content data_item no indent) diffed_row, null pk_value, col_name, diff_id
from (
select nvl(exp.rn, act.rn) rn,
exp.diff_id diff_id,
xmlagg(exp.col order by exp.col_no) exp_item,
xmlagg(act.col order by nvl(exp.col_no, act.col_no)) act_item,
max(nvl(exp.col_name,act.col_name)) col_name
from exp_cols exp
join act_cols act
on exp.rn = act.rn and exp.col_name = act.col_name
where dbms_lob.compare(exp.col_val, act.col_val) != 0
group by nvl(exp.rn, act.rn), exp.diff_id
)
unpivot ( data_item for diff_type in (exp_item as 'Expected:', act_item as 'Actual:') )
),
unordered_diff as (
select rn, diff_type, xmlserialize(content data_item no indent) diffed_row, null pk_value, col_name, diff_id
from (
select nvl(exp.rn, act.rn) rn,
exp.diff_id diff_id,
xmlagg(exp.col order by exp.col_name) exp_item,
xmlagg(act.col order by act.col_name) act_item,
max(nvl(exp.col_name,act.col_name)) col_name
from exp_cols exp
join act_cols act
on exp.rn = act.rn and exp.col_name = act.col_name
where dbms_lob.compare(exp.col_val, act.col_val) != 0
group by nvl(exp.rn, act.rn), exp.diff_id
)
unpivot ( data_item for diff_type in (exp_item as 'Expected:', act_item as 'Actual:') )
)
select rn, diff_type, diffed_row, pk_value pk_value
select rn, diff_type, diffed_row, pk_value
from (
select rn, diff_type, diffed_row, pk_value,
case when diff_type = 'Actual:' then 1 else 2 end rnk,
1 final_order,
col_name
from ( ]'
|| case when a_unordered then q'[
select rn, diff_type, xmlserialize(content data_item no indent) diffed_row, pk_value, col_name
from (
select nvl(exp.rn, act.rn) rn,
nvl(exp.pk_value, act.pk_value) pk_value,
exp.col exp_item,
act.col act_item,
nvl(exp.col_name,act.col_name) col_name
from exp
join act
on exp.rn = act.rn and exp.col_name = act.col_name
where dbms_lob.compare(exp.col_val, act.col_val) != 0
)
unpivot ( data_item for diff_type in (exp_item as 'Expected:', act_item as 'Actual:') ) ]'
select /*+ no_unnest */
u.rn, u.diff_type, u.diffed_row,
replace(
extract( case when i.exp_data_id is null then i.act_item_data else i.exp_item_data end, :join_by ).getclobval(),
chr(10)
) pk_value,
u.col_name
from data_diff u
join ut_compound_data_diff_tmp i
on i.diff_id = u.diff_id
and i.item_no = u.rn]'
else q'[
select rn, diff_type, xmlserialize(content data_item no indent) diffed_row, null pk_value, col_name
from (
select nvl(exp.rn, act.rn) rn,
xmlagg(exp.col order by exp.col_no) exp_item,
xmlagg(act.col order by act.col_no) act_item,
max(nvl(exp.col_name,act.col_name)) col_name
from exp exp
join act act
on exp.rn = act.rn and exp.col_name = act.col_name
where dbms_lob.compare(exp.col_val, act.col_val) != 0
group by (exp.rn, act.rn)
)
unpivot ( data_item for diff_type in (exp_item as 'Expected:', act_item as 'Actual:') ) ]'
select rn, diff_type, diffed_row, pk_value, col_name
from data_diff
where :join_by is null ]'
end ||q'[
)
union all
Expand Down Expand Up @@ -522,14 +547,12 @@ create or replace package body ut_compound_data_helper is
case when final_order = 1 then to_char(rn) else col_name end,
case when final_order = 1 then to_char(rnk) else col_name end
]'
else
null
end;
execute immediate l_sql
bulk collect into l_results
using l_exp_extract_xpath, l_join_xpath, a_diff_id, a_expected_dataset_guid,a_extract_path,
l_act_extract_xpath, l_join_xpath, a_diff_id, a_actual_dataset_guid,a_extract_path,
l_join_xpath, l_join_xpath, a_diff_id;
using l_exp_extract_xpath, a_diff_id, a_expected_dataset_guid, a_extract_path,
l_act_extract_xpath, a_diff_id, a_actual_dataset_guid, a_extract_path,
l_join_xpath, l_join_xpath, l_join_xpath, a_diff_id;
return l_results;
end;

Expand Down
6 changes: 2 additions & 4 deletions test/ut3_user/expectations/test_expectation_anydata.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -864,10 +864,8 @@ Rows: [ 60 differences, showing first 20 ]
l_expected_message := q'[%Actual: ut3_tester_helper.test_dummy_object_list [ count = 2 ] was expected to equal: ut3_tester_helper.test_dummy_object_list [ count = 2 ]
%Diff:
%Rows: [ 3 differences ]
%PK <ID>2</ID> - Actual: <name>Something 2</name>
%PK <ID>2</ID> - Actual: <Value>2</Value>
%PK <ID>2</ID> - Expected: <name>Something 1</name>
%PK <ID>2</ID> - Expected: <Value>1</Value>
%PK <ID>2</ID> - Actual: <name>Something 2</name><Value>2</Value>
%PK <ID>2</ID> - Expected: <name>Something 1</name><Value>1</Value>
%PK <ID>1</ID> - Extra: <TEST_DUMMY_OBJECT><ID>1</ID><name>Something 1</name><Value>1</Value></TEST_DUMMY_OBJECT>
%PK <ID>4</ID> - Missing: <TEST_DUMMY_OBJECT><ID>4</ID><name>Something 2</name><Value>2</Value></TEST_DUMMY_OBJECT>]';
l_actual_message := ut3_tester_helper.main_helper.get_failed_expectations(1);
Expand Down
22 changes: 10 additions & 12 deletions test/ut3_user/expectations/test_expectations_cursor.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ create or replace package body test_expectations_cursor is
l_expected_message := q'[Actual: refcursor [ count = 1 ] was expected to equal: refcursor [ count = 1 ]
%Diff:
%Rows: [ 1 differences ]
%Row No. 1 - Actual: <COL_4>40</COL_4><COL_3>30</COL_3>
%Row No. 1 - Actual: <COL_3>30</COL_3><COL_4>40</COL_4>
%Row No. 1 - Expected: <COL_3>3</COL_3><COL_4>4</COL_4>]';
l_actual_message := ut3_tester_helper.main_helper.get_failed_expectations(1);
--Assert
Expand All @@ -394,7 +394,7 @@ create or replace package body test_expectations_cursor is
l_expected_message := q'[Actual: refcursor [ count = 1 ] was expected to equal: refcursor [ count = 1 ]
%Diff:
%Rows: [ 1 differences ]
%Row No. 1 - Actual: <COL_4>40</COL_4><COL_3>30</COL_3>
%Row No. 1 - Actual: <COL_3>30</COL_3><COL_4>40</COL_4>
%Row No. 1 - Expected: <COL_3>3</COL_3><COL_4>4</COL_4>]';
l_actual_message := ut3_tester_helper.main_helper.get_failed_expectations(1);
--Assert
Expand Down Expand Up @@ -860,9 +860,9 @@ Columns:
Rows: [ 4 differences ]
Row No. 1 - Actual: <SALARY>25000</SALARY>
Row No. 1 - Expected: <SALARY>10000</SALARY>
Row No. 2 - Actual: <FIRST_NAME>TONY</FIRST_NAME><LAST_NAME>STARK</LAST_NAME><ID>3</ID><SALARY>100000</SALARY>
Row No. 2 - Actual: <ID>3</ID><FIRST_NAME>TONY</FIRST_NAME><LAST_NAME>STARK</LAST_NAME><SALARY>100000</SALARY>
Row No. 2 - Expected: <ID>2</ID><FIRST_NAME>LUKE</FIRST_NAME><LAST_NAME>SKYWALKER</LAST_NAME><SALARY>1000</SALARY>
Row No. 3 - Actual: <FIRST_NAME>JESSICA</FIRST_NAME><LAST_NAME>JONES</LAST_NAME><ID>4</ID><SALARY>2345</SALARY>
Row No. 3 - Actual: <ID>4</ID><FIRST_NAME>JESSICA</FIRST_NAME><LAST_NAME>JONES</LAST_NAME><SALARY>2345</SALARY>
Row No. 3 - Expected: <ID>3</ID><FIRST_NAME>TONY</FIRST_NAME><LAST_NAME>STARK</LAST_NAME><SALARY>100000</SALARY>
Row No. 4 - Extra: <GENDER>M</GENDER><FIRST_NAME>LUKE</FIRST_NAME><LAST_NAME>SKYWALKER</LAST_NAME><ID>2</ID><SALARY>1000</SALARY>]';
l_actual_message := ut3_tester_helper.main_helper.get_failed_expectations(1);
Expand Down Expand Up @@ -896,9 +896,9 @@ Columns:
Rows: [ 4 differences ]
Row No. 1 - Actual: <SALARY>25000</SALARY>
Row No. 1 - Expected: <SALARY>10000</SALARY>
Row No. 2 - Actual: <FIRST_NAME>TONY</FIRST_NAME><LAST_NAME>STARK</LAST_NAME><ID>3</ID><SALARY>100000</SALARY>
Row No. 2 - Actual: <ID>3</ID><FIRST_NAME>TONY</FIRST_NAME><LAST_NAME>STARK</LAST_NAME><SALARY>100000</SALARY>
Row No. 2 - Expected: <ID>2</ID><FIRST_NAME>LUKE</FIRST_NAME><LAST_NAME>SKYWALKER</LAST_NAME><SALARY>1000</SALARY>
Row No. 3 - Actual: <FIRST_NAME>JESSICA</FIRST_NAME><LAST_NAME>JONES</LAST_NAME><ID>4</ID><SALARY>2345</SALARY>
Row No. 3 - Actual: <ID>4</ID><FIRST_NAME>JESSICA</FIRST_NAME><LAST_NAME>JONES</LAST_NAME><SALARY>2345</SALARY>
Row No. 3 - Expected: <ID>3</ID><FIRST_NAME>TONY</FIRST_NAME><LAST_NAME>STARK</LAST_NAME><SALARY>100000</SALARY>
Row No. 4 - Extra: <GENDER>M</GENDER><FIRST_NAME>LUKE</FIRST_NAME><LAST_NAME>SKYWALKER</LAST_NAME><ID>2</ID><SALARY>1000</SALARY>]';
l_actual_message := ut3_tester_helper.main_helper.get_failed_expectations(1);
Expand Down Expand Up @@ -1237,10 +1237,8 @@ Rows: [ 4 differences ]
l_expected_message := q'[Actual: refcursor [ count = 1 ] was expected to equal: refcursor [ count = 1 ]
%Diff:
%Rows: [ 1 differences ]
%PK <COL_1>1</COL_1> - Actual: <COL_3>30</COL_3>
%PK <COL_1>1</COL_1> - Expected: <COL_3>3</COL_3>
%PK <COL_1>1</COL_1> - Actual: <COL_4>40</COL_4>
%PK <COL_1>1</COL_1> - Expected: <COL_4>4</COL_4>]';
%PK <COL_1>1</COL_1> - Actual: <COL_3>30</COL_3><COL_4>40</COL_4>
%PK <COL_1>1</COL_1> - Expected: <COL_3>3</COL_3><COL_4>4</COL_4>]';
l_actual_message := ut3_tester_helper.main_helper.get_failed_expectations(1);
--Assert
ut.expect(l_actual_message).to_be_like(l_expected_message);
7AEC Expand Down Expand Up @@ -2511,7 +2509,7 @@ Diff:%
begin
l_exp_message :='ORA-20218: SQL exception thrown when fetching data from cursor:
ORA-01476: divisor is equal to zero
at "UT3$USER#.TEST_EXPECTATIONS_CURSOR%", line 2522 ut3.ut.expect(l_actual).to_equal(l_expected);%
at "UT3$USER#.TEST_EXPECTATIONS_CURSOR%", line % ut3.ut.expect(l_actual).to_equal(l_expected);%
Check the query and data for errors.';

open l_actual for
Expand All @@ -2536,7 +2534,7 @@ Check the query and data for errors.';

l_exp_message :='ORA-20218: SQL exception thrown when fetching data from cursor:
ORA-01476: divisor is equal to zero
at "UT3$USER#.TEST_EXPECTATIONS_CURSOR%", line 2547 ut3.ut.expect(l_actual).to_equal(l_expected);%
at "UT3$USER#.TEST_EXPECTATIONS_CURSOR%", line % ut3.ut.expect(l_actual).to_equal(l_expected);%
Check the query and data for errors.';

open l_expected for
Expand Down
0