summaryrefslogtreecommitdiffstats
path: root/integration-test
AgeCommit message (Collapse)AuthorFilesLines
2023-08-22Merge "Missing test for getDataNodes (ep1)"Luke Gleeson1-0/+14
2023-08-18Missing test for getDataNodes (ep1)Arpit Singh1-0/+14
- there was no test to check the exceptions thrown by getDataNodes Signed-off-by: Arpit Singh <as00745003@techmahindra.com> Change-Id: Ifa1df8ebe83fafba833be14559d94261bca93ef0
2023-08-18CPS-Core : Expose a java interface to update schema setsourabh_sourabh6-5/+107
- Exposed an interface to update anchor by schema set name. - New interface is implemented into RI model. - New native query is exposed to update id with given schema set name. - A new integration test is written to test new interface into cps core. Issue-ID: CPS-1800 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Change-Id: Ibf44712e11b53cb6673b04b9e3fd864321c90839 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2023-08-17Update of top-level data node fails with SQL errordanielhanrahan1-0/+11
The error is caused by the fetch-descendants code using ResultSet.getLong which returns a 'long' primitive instead of a 'Long' object. Thus a parent ID of 'NULL' becomes '0', which causes an error during update. To preserve the NULL value, ResultSet.getObject must be used. Issue-ID: CPS-1841 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ida6837a04954cd3c23f0f2faabd7d0712d8ee19d
2023-08-15Update performance test timing for warmupdanielhanrahan2-2/+2
Incorrect limit on the warmup results in performance pipeline failing, as the first test that runs must include the time taken to write initial data. Issue-ID: CPS-1811 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I82353fcd5d0904f458808b32f4f01597ba25a688
2023-08-04Update performance test timings for larger datasetdanielhanrahan9-159/+159
- Populate 3 anchors with 1000 openroadm devices nodes for read and query tests (over 250,000 fragments) - Increase update perf tests to update 100 out of 1000 devices - Increase delete perf tests to delete 100 out of 300 devices - Remove bookstore data from performance tests - Update test timings Issue-ID: CPS-1811 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Iaa36694be907278e772ae729a85510ea9d004fd1
2023-08-03Fix: integration test that is for add and delete top level list elementhalil.cakal1-1/+1
Issue-ID: CPS-1605 Change-Id: Ia6ba73d5e4930bcc547cf24d06c50c681c3a7452 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2023-08-03Merge "Support pagination in query across all anchors(ep4)"Luke Gleeson4-24/+70
2023-08-02Support pagination in query across all anchors(ep4)rajesh.kumar4-24/+70
Add pagination query parameters in query across all anchors API pagination parameters (pageIndex and pageSize) are optional default is to query all fragments each pageSize represents number of records(number of anchors) TotalRecords is returned in response header to find number of pages. - If pagination option is provided in request then query number of anchors equal to pageSize. pageIndex is used for setting offset. - return number of records(one anchor per record) as per pagesize and pageSize Issue-ID: CPS-1605 Change-ID: I73f97f986a817d423f93a8d922dcd9647b2504bc Signed-off-by: rajesh.kumar <rk00747546@techmahindra.com>
2023-08-01Merge "Fix: Make bookstore data consistent"Toine Siebelink3-27/+17
2023-07-31Add 'direct' keyword to descendants option to query direct children (ep1)Rudrangi Anupriya5-29/+27
-added 'direct' keyword also to Fetch Descendants Option along with 'all' and 'none' to Query direct child. -added unit tests to test direct keyword Issue-ID: CPS-1784 Change-Id: Icb7f59fbeebb03703626132d6d5d2cfde0e5ab4d Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2023-07-28Use constants for magic numbers in perf testsdanielhanrahan3-30/+30
Issue-ID: CPS-1811 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ic87bcb1847b97a0e8c59b2e3636e9ccd66f814ae
2023-07-28Add 'direct' keyword to descendants option to query direct children (ep1)Rudrangi Anupriya5-29/+32
-added 'direct' keyword also to Fetch Descendants Option along with 'all' and 'none' to Query direct child. -added unit tests to test direct keyword Issue-ID:CPS-1784 Change-Id: Iab7f59fbeebb03703626132c6d5c2afde0e5ab4d Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2023-07-27Merge "Improve 32K limit tests"Toine Siebelink1-20/+56
2023-07-27Merge "Add write performance tests"Toine Siebelink1-0/+83
2023-07-27Improve 32K limit testsdanielhanrahan1-20/+56
Some operations were previously limited to 32,768 parameters, such as getDataNodesForMultipleXpaths. After this limit was lifted, the tests only verified that database exceptions were not thrown. This commit improves the tests by verifying that the operations return or delete the expected data. - Create 33,000 data nodes - Verify that getDataNodesForMultipleXpaths returns 33,000 nodes - Verify than deleteDataNodes deletes 33,000 nodes Issue-ID: CPS-1811 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I7029ea0cf1d4e95c5ca814ca62c222fc5b9ddc7e
2023-07-27Merge "Allow getDataNodes to read whole lists(ep 1)"Sourabh Sourabh2-21/+48
2023-07-27Allow getDataNodes to read whole lists(ep 1)danielhanrahan2-21/+48
- getDataNodes can now retrieve list data nodes. Issue-ID: CPS-1696 Signed-off-by: arpitsingh <as00745003@techmahindra.com> Change-Id: I320a368d6cb73599d3f7c13fe9b8ab7d0cc69470
2023-07-27Merge "Performance test of reading non-existing datanodes"Toine Siebelink2-3/+19
2023-07-27Fix: Make bookstore data consistentArpit Singh3-27/+17
- Removed list named invoice from all bookstore files - Added a new parent list as bookstore-address - Refactored tests Issue-ID: CPS-1813 Signed-off-by: Arpit Singh <as00745003@techmahindra.com> Change-Id: I5c7e83e1ee0ad9ac1d94d1906c2361c7a00d49af
2023-07-27Add write performance testsdanielhanrahan1-0/+83
- Add perf test for openroadm (linear time) - Add perf test for bookstore (exponential time!) Issue-ID: CPS-1811 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I9c1772a9e9684707f2dbb32b2c361ec248fb1c60
2023-07-26Performance test of reading non-existing datanodesdanielhanrahan2-3/+19
Issue-ID: CPS-1811 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I183129bb5b0a2d620b87e9b36f3113fe8e169798
2023-07-26Performance test of deleting non-existing datanodesdanielhanrahan1-2/+18
Issue-ID: CPS-1811 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ifae635f45d8ec1990452ade958253972fde68415
2023-07-26Some performance tests are skipped due to filenamedanielhanrahan2-2/+2
CPS POM is setup so that only files ending in 'Spec' or 'Test' are run as tests, and files ending in 'PerfTest' will only run in the 'include-performance' profile. The 32K limit tests are currently being skipped always, as they do not end in 'Spec', 'Test', or 'PerfTest'. This commit renames them to PerfTest. Issue-ID: CPS-1811 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I75a4ae92edf324213f734503c23dedb2b31fd007
2023-07-21Prepare for next CPS-NCMP releaseegernug1-1/+1
Issue-ID: CPS-1797 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: Ib2b840b6b37131f16afd879720658d2e45387d6a
2023-07-20Merge "Apostrophe handling in CpsPathParser"Toine Siebelink1-0/+19
2023-07-20Merge "Persisting a list element to a parent list (ep2)"Luke Gleeson3-2/+59
2023-07-20Apostrophe handling in CpsPathParserdanielhanrahan1-0/+19
Apostrophe is not currently handled correctly, and having apostrophe in the xpath will lead to various errors. For example, normalizing this xpath works: /path[@name="I'm quoted"] -> /path[@name='I\'m quoted'] However the resulting xpath will throw a PathParsingException if parsed! (Thus path normalization is not idempotent.) - Use '' for escaping apostrophe in single quoted leaf value, to comply with XPath standard (and use "" for escaping in "). - Use Liquibase to make existing data comply with new rules. - Leaf values in data leaves are now unescaped, e.g. "I'm quoted" - Quoting is now consistent for leaf/text/contains conditions. Issue-ID: CPS-1769 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Iafc287f738254d7f99706c6bc548091c0ecd5aa0
2023-07-20Merge "Allow duplicate leaf names in Cps Path leaf condition"Toine Siebelink3-68/+128
2023-07-19Prepare for next CPS-NCMP releaseegernug1-1/+1
Issue-ID: CPS-1791 Signed-off-by: egernug <gerard.nugent@est.tech> Change-Id: Ide0fcdfa41656e25395ac8478da1bb489fd8663e
2023-07-18Persisting a list element to a parent list (ep2)Rudrangi Anupriya3-2/+59
Post List Element does not allow for create List Element, only appends onto existing node as children -Add a check in saveListElements to see if the parent xpath is a root path ("/").If root node store list element as top node. Else add passed list element to parent xpath node. -Add test for scenario for above -Add test scenario Saving list element data fragment under Root node -Add Integration Tests Add and Delete top-level list (element) data nodes with root node -Update bookstore model with TopLevelList datanode Issue-ID: CPS-1586 Change-Id: Iaa7f59fbeebb03703626132c6d5c2afde0e7ab4b Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2023-07-17Allow duplicate leaf names in Cps Path leaf conditiondanielhanrahan3-68/+128
Presently, a query using the same leaf name twice will fail: //books[@price > 10 and @price < 20] It is caused by storing data leaves in a Map. This is fixed by storing data leaves in a List<DataLeaf>. Issue-ID: CPS-1779 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ie6990ea5e622cf37e986b720a0a07fb69ce4f03b
2023-07-11Combine alreadyDefinedException classesdanielhanrahan1-10/+10
Issue-ID: CPS-1774 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I52ff9074a9f8188e8635a811b0d2713a97cb4b10
2023-07-10Handle special characters in CpsPath queries (CPS-1760 #2)danielhanrahan2-18/+40
This fixes issues with special characters for CPS-500, CPS-1756, CPS-1758, and CPS-1760. It also improves query performance. - use SQL LIKE instead of regex in Cps Path queries Issue-ID: CPS-1763 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I5c179882bfba71d3b009c60059e9073f46227e7d
2023-07-06Escape SQL LIKE wildcards in queries (CPS-1760 #1)danielhanrahan1-0/+11
If '%' and '_' are used in the contains-condition of a CpsPath query, incorrect results will be returned. For example: /bookstore/categories[contains(@code, "%")] Special characters in the contains-condition value must be escaped. Issue-ID: CPS-1762 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I2fdd5a26433d510cd7d6af5b734a6779b537d63d
2023-06-30Prepare for next CPS-NCMP releasempriyank1-1/+1
- updated the docs. - Bumped the version to 3.3.4-SNAPSHOT for the next release. Issue-ID: CPS-1773 Change-Id: Ibe9a694baadb33d284913868452b143c14d105cc Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2023-06-29Merge "Normalize parent xpath when building datanodes in CpsDataService"Toine Siebelink1-76/+82
2023-06-29Update write performance test timingsdanielhanrahan1-4/+4
Issue-ID: CPS-1673 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ia2e5bf557bf2ade98fba64b7923856f727049d84
2023-06-27Normalize parent xpath when building datanodes in CpsDataServicedanielhanrahan1-76/+82
Data nodes are being saved with non-normalized xpaths, resuling in data nodes that cannot be operated on. This affects all operations including get, query, update, and delete. Issue-ID: CPS-1765 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I5352182d79daec67805753ca5943b1a86c18159f
2023-06-21Improve performance of updateDataLeavesdanielhanrahan1-4/+4
Avoid fetching descendants during batchUpdateDataLeaves, as descendants are not needed: - Remove prefetch descendants step from getFragmentEntities; - Explicitly prefetch descendants in operations requiring it; - Update performance tests (5x faster for batch update). Issue-ID: CPS-1675 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I7442a6f799cc0803b3a78f09d1ee53377f24b0b7
2023-06-21Add performance tests for updateDataLeavesdanielhanrahan1-2/+31
Issue-ID: CPS-1675 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I4dcd2ff0d0f6c3acf7373357da0ef7217a691573
2023-06-19Update performance test timingsdanielhanrahan4-25/+25
The fixes to lower memory usage in FragmentRepository have positively affected read performance, so tests must be updated. Issue-ID: CPS-1716 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I2c8b882f56fb8c1eaefe5b802da1d308d16b1f02
2023-06-19Move integration test (clean-up, last phase)ToineSiebelink3-10/+90
- Moved session manager test - Improved schemaset concurrency test (retry testing) - Cleaned up all ri (container based) integration test (setup) - Applied some groovy best practice where needed - internal ri module cover now down to 29%, covred by integration instead with - Line coverage up by 41 lines to 99% (was 97%) - Branch coverage up by 3 branches to 96% (was 93%) Issue-ID: CPS-1687 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ifb77a053e5a5db62a3f6a32ae60a3a8b10918efd
2023-06-15Bump CPS version to 3.3.3-SNAPSHOTdanielhanrahan1-1/+1
- Update version properties as well as we prepare for the next release. Issue-ID: CPS-1750 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I0626eee7834499d2fa96812fb416ce7daebf0529
2023-06-12Move integration test (DataService)ToineSiebelink3-71/+303
- Moved all Data Intergation Test - Added/improved some module Moudle Servcie test too - Removed some unused (impossible) code-paths in prod code - Replaced null's with meaningful strings (in edge case scenarios) - Replaced @Shared with static (shorter) in some test Issue-ID: CPS-1687 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ib4b1ec1706ace7e3f5ac03d85177a6f7d4f6b8d0
2023-06-01<,> operators documentRudrangi Anupriya1-1/+1
Issue-ID: CPS-1273 Change-Id: Ibbbbe90a28c3711ef211136cd8f8c0f265a51537 Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2023-05-30Add <,> operators support to cps-pathRudrangi Anupriya1-3/+31
Issue-ID: CPS-1273 Change-Id: I5d562463b9a49abfe0436047a637857d10596fff Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2023-05-17Entity ID types do not match types in database definitionToineSiebelink1-3/+3
As Liquibase is used, JPA does not manage database definition. Within Liquibase changelog, only Anchor and Fragment have BIGINT (Long) IDs. Other entities have INTEGER IDs. - Change AnchorEntity/AnchorRepository ID type to Long - Change YangResourceEntity/YangResourceRepository and ModuleReferenceRepository ID to Integer - Modify datatypes of foreign key references in liquibase changelog to use correct types for dataspace_id, schema_set_id, yang_resource_id - Update test liquibase changelog Issue-ID: CPS-1676 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I26de6712b2e74d166fc5a48b1f8149de6a1e5199 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2023-05-17Move integration test for adminServiceToineSiebelink1-1/+45
- finalized moving of admin service interation test (just some scenarios were missing) - deleted old test class (code coverage in RI module dropped) - line/branch coverage now 100/100 (was 97/91) - small refactoring; renaming and removed unnecessary check Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ic683548ea5e1e4e252f257c0f1034c5cf76e498d
2023-05-12Remove dataspace_id column from Fragment tabledanielhanrahan1-32/+4
- Remove dataspace_id column from fragment table and drop associated index, foreign key constraint and uniqueness constaint. - Add uniqueness constraint using only fragment xpath and anchor_id. - Add not-null constraint to anchor_id. - Update code and test data to remove references to dataspace_id. - Repopulate the dataspace_id in Liquibase rollback (verified with manual testing of update/rollback). Issue-ID: CPS-1677 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I467cccba25ac5d884ec790064ca58150281b7e1d