aboutsummaryrefslogtreecommitdiffstats
path: root/integration-test/src/test
AgeCommit message (Collapse)AuthorFilesLines
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-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
2023-05-11Move integration test for moduleServiceToineSiebelink1-0/+278
- all modules service interation test moved - added some aditional scenarios to increase coverage - removed unused method(s) - remove javdoc on private methods - some minor refactoring like replace 'var' with correct type Issue-ID: CPS-1687 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I03ff1f3562cfe38318e8b9af81be47a1fe667da2
2023-05-10Move integration test (DataService)ToineSiebelink2-8/+70
- dropped ri module coverage to alow for move - removed performance tests (already better tests in intergration module) - added 'save' iue cases in new integration-test - removed no longer used version for save single data node (todo: remove old tests for similar functionality, will wait until new test cover same) Issue-ID: CPS-1687 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I4c2e788e0a313938a923cd1e7e52584d739ec6f4
2023-05-09Migrate cps-ri performance tests to integration-test moduledanielhanrahan6-22/+339
- Migrate update and delete data service tests, using openroadm model - Move module service tests to integration-test module - Update performance test timings - Remove all performance-related files from cps-ri - Remove performance profile from cps-ri pom.xml Issue-ID: CPS-1687 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Id9d864f8cab0377cb37c7967943d738748e1b6c5
2023-05-09Support for Patch across multiple data nodes--global2-0/+33
- Added new method updateMultipleDataLeaves to perform Update on multiple data nodes - Deprecated singular method of update data node(updateDataLeaves) - Refactored code where singular version was used - Updated release notes Issue-ID: CPS-1006 Signed-off-by: <as00745003@techmahindra.com> Change-Id: If67280e2dd3ad566de9a8217489f168415e624bc
2023-05-04Use recursive SQL to fetch descendants in CpsPath queries (CPS-1664 #4)danielhanrahan1-9/+9
- Add recursive SQL method to fetch descendants from queries. This changes worst-case complexity from quadratic to linear, resulting in extremely large performance increase for large number of datanodes. - Remove RegexQuickFind algorithm as it is no longer faster. - Updated query performance test timings Issue-ID: CPS-1664 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: If5f0b54a88af1cb681006bbeca7043345dcdc8da
2023-05-04Fix and refactor query across anchors (CPS-1664 #3)danielhanrahan2-6/+1
- Fix CPS-1580: Query Across All Anchors Does NOT Filter on Dataspace - Fix CPS-1582: NullPointerException in queryDataNodesAcrossAnchors - Improve performance of queryDataNodesAcrossAnchors - Refactor queryDataNodes - Refactor FragmentQueryBuilder Issue-ID: CPS-1580 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I8b83d4c580280d8719ab2ac33f3914f53e798774
2023-05-04Fix for quickfind with descendants incl. list entriesToineSiebelink1-0/+17
- add specialized regex - fixed legacy issues with absolute paths (added ^ in regex's) - split into 2 methods for normal queries and quickfind - fixed order of private methods Issue-ID: CPS-1671 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I785a230cd0e3e0359e3cbb0fa754a21b6e2be7ff
2023-05-03canUseRegexQuickfind does not test for contains-conditiondanielhanrahan1-9/+7
This bug causes queries using contains-condition to return wrong results, when INCLUDE_ALL_DESCENDANTS option is set. Issue-ID: CPS-1663 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: If323e0e3b54d8c9a213dffda46897b2efb01fe2a
2023-04-28Merge "Add document for support for contains condition to cps-path"Luke Gleeson1-1/+0
2023-04-27Add document for support for contains condition to cps-pathRudrangi Anupriya1-1/+0
Issue-ID: CPS-1272 Change-Id: I32c03d5ed80e5d16d4b5c0f726539a6da487abd6 Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2023-04-27Merge "Ordering of leaf elements to support combination of AND/OR in cps-path"Luke Gleeson1-24/+28
2023-04-25Ordering of leaf elements to support combination of AND/OR in cps-pathRudrangi Anupriya1-24/+28
Issue-ID: CPS-1629 Change-Id: Ib9df87e8171f4d53c49d80d27e3c6cf75aa3b209 Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2023-04-24Remove 32K limit from queries with collection parametersdanielhanrahan2-18/+16
SQL queries taking collection parameters currently create a seperate query parameter for each collection element. There is a limit of around 2^15 (32,768) query parameters. Postgres DB natively supports array types, in which the whole array is transmitted in binary as a single parameter. Changing queries to use arrays removes the 32K limit on queries. - Add support for Postgres arrays to queries - Change repository methods to use arrays, and provide overloaded versions taking collection parameters - Update tests to reflect 32K limit being lifted Issue-ID: CPS-1573 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I64f2aeaedbe54bfe12e3079cba0f2216759142c3
2023-04-24Merge "Use exact type for objectUnderTest in groovy tests"Sourabh Sourabh6-7/+13
2023-04-24Merge "Add cascade delete fragments to liquibase test config"Toine Siebelink1-0/+34
2023-04-21Merge "Add contains condition support to cps-path"Luke Gleeson1-0/+18
2023-04-21Add cascade delete fragments to liquibase test configdanielhanrahan1-0/+34
Cascade delete was added to fragments table in main DB changelog, but not to integration-test changelog. Issue-ID: CPS-1617 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: If85f120dfdc4bf3e9c8a1dde2b982378560d418a
2023-04-21Use exact type for objectUnderTest in groovy testsdanielhanrahan6-7/+13
Intelli-J doesn't know the type of objectUnderTest since it is assigned in setup function. Thus many IDE features such as as JavaDocs and error detection of wrong arguments are unavailable. By setting the exact type, all IDE features are enabled. Issue-ID: CPS-1621 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I3dabf82ef9d07b3c18f9820fa768344c2eeec1b6
2023-04-21Add contains condition support to cps-pathRudrangi Anupriya1-0/+18
Issue-ID: CPS-1272 Change-Id: Ic81d1322cacc64a8752916324b801d02be47d34f Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2023-04-14Add tests for 32K limit for collection parametersdanielhanrahan3-10/+113
SQL queries taking collection parameters currently create a seperate query parameter for each collection element. There is a limit of around 2^15 (32,768) query parameters. - Add tests for cps-service methods exceeding the collection size limit Issue-ID: CPS-1573 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I7169b3604f4dd0bb23bba8ff33f0102c43052c03
2023-04-14Add OR operator to cps-pathRudrangi Anupriya1-6/+35
Issue-ID: CPS-1215 Change-Id: I91fdf5bddcc4fc12a8cf9dbce75f77c832c55871 Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2023-04-13Migrate query tests to integration-test module #6danielhanrahan6-44/+111
- Remove old tests and broken test data, where fragments in ANCHOR-005 have parent fragments in ANCHOR-004 - Migrate tests to new test framework using bookstore model - Add two bookstore anchors to test querying across both - Add bookstore data to another test dataspace, to verify querying across anchors should be limited to one dataspace - Lower minimum module coverage, since cps-ri tests are now in integration-test - @Ignore failing tests for now Issue-ID: CPS-1595 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I808de288961cb84a486052f9e1dc8fed5f2afe03
2023-04-12Migrate query tests to integration-test module #5danielhanrahan4-7/+55
- Migrate query tests for composite keys to integration-test - Add addresses with composite key to bookstore model Issue-ID: CPS-1597 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I6f8dfc2c44ae6ba3bac1cce804841671ef5a009d
2023-04-12Migrate query tests to integration-test module #3danielhanrahan3-6/+35
Issue-ID: CPS-1597 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I1d92355f272271424a7014057d251cf88eac0203
2023-04-12Merge "Migrate query tests to integration-test module #2"Sourabh Sourabh5-84/+139
2023-04-11Performance tests for getDataNodes and queryDataNodesdanielhanrahan5-10077/+568
- Generate openroadm data from a single innerNode.json template - Double the number of openroadm device nodes (25 -> 50) in tests - Add new performance tests for getDataNodes and queryDataNodes to integration-test module, using openroadm and bookstore data - Remove old performance tests from cps-ri Issue-ID: CPS-1524 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Id9ec2a86d984d6c50c9ae6093e7a62729cb851da
2023-04-11Migrate query tests to integration-test module #2danielhanrahan5-84/+139
- Migrate some query tests to integration-test - Edit bookstore model to add integer leaf-list 'editions' - Lower cps-ri code coverage Issue-ID: CPS-1597 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: If50bf15ad7d7f147448f6b60d464efc1cdc91005
2023-04-11Merge "Migrate query tests to integration-test module #1"Toine Siebelink1-6/+42
2023-04-11Migrate query tests to integration-test module #1danielhanrahan1-6/+42
Issue-ID: CPS-1597 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I0403641e2e5293571c61a58aa2b67b144cf68ac4
2023-04-11Populate Dataspace field of DataNodedanielhanrahan1-1/+12
Issue-ID: CPS-1603 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I85aca8bccc28d36aa4cefa0a32cb9bdf2156618a
2023-04-05Migrate query tests to integration-test module #4danielhanrahan1-2/+50
Issue-ID: CPS-1597 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Id3b4a3829b6f9aec1a649ed0001d7c11db91ccfe
2023-04-04Add Query Spec to integration-test packagelukegleeson1-0/+48
Issue-ID: CPS-1598 Signed-off-by: lukegleeson <luke.gleeson@est.tech> Change-Id: Ifab8863eae4a3ee07ba3d6096e73f9f98077584d
2023-03-30Fix assertion in integration-test performance testsdanielhanrahan1-1/+1
Issue-ID: CPS-1587 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I044e4c81ce9972bb7979b494496d74beb733c5ed
2023-03-13Fetch fragment entities using recursive SQL querydanielhanrahan3-13/+33
- Add SQL query that can fetch needed fragments to any given depth - Update getFragmentEntities to use new query - Remove now unused FragmentRepositoryMultiPathQuery - Remove unused TempTableCreator method - Result: getDataNodesForMultipleXpaths is up to 10 times faster Issue-ID: CPS-1525 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I07cbc9da5ab994ce7e0c2b02d7ca05089f05dab0
2023-03-10Add schema_set_yang_resources index to testsdanielhanrahan1-0/+15
- Add missing index to liquibase test-changelog.yaml Issue-ID: CPS-1535 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I2f8ee9f66b3f433be2f61e17759f0f6c9f2e4707
2023-03-09Create Base and Sample Performance Integration TestsToineSiebelink17-29/+33054
- added data (folders) for different models and json data - added base and data for cps-ncmp (registry) specific test cases - integrated Ahila's (large) openroadm model and data (corrected version provided by Lee Anjella) - created profiles to exclude/include *PerfTest - fixed dependency test check - included integration test for overall coverage - increased margings in existing perf test to reduce nordix intermitten failures Issue-ID: CPS-1516 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: Ia82826f610636c14aa7e8939b385c278e5039817
2023-02-27Expand CPS Service Integration Test (framework)ToineSiebelink6-102/+229
- Created package structure - Created several test bases - Created complete test set for Admin service - Created first test for Data service - Added human-readable toString() to FetchDescendantsOption for test reporting and debuging purposes - Renamed fetch descendants (enum) direct children option for consistency with others options - TODO: Add sample performance test (and base) Issue-ID: CPS-475 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I75317686161be41662b6bf81314a9cd425ddd6eb
2023-02-17CPS-1401 Implement V2 of GET Data Node APIarpitsingh1-2/+3
- Modified the GET Data Node API so it returns all the data nodes when xpath set to root "/" - Fragment Repository now returns a collection of Fragment Entities - Instead of returning only the first Fragment Entity now all fragment entities are returned when xpath is set to root - The Fragemnt Entities are further processed to a Collection of Data Nodes. As opposed to singular Data Node in current implementation. - Finally the DataRestController also returns a Collection of Data Nodes when xpath is set to root and valid data is present - Response body changed from JSON object to JSON Array. - Exception handling for invalid xpath and non-existing xpath is now done separately at persistence layer. - Refactored code against CPS-1422 - Deprecated getDataNode method from Service and Persistence layer - Modified V1 of Get Data Node API to use the getDataNodes method and get the first data node from the collection returned. - Modified NCMP to use getDataNodes method - NCMP still does not support multiple data nodes. It retrieves the first data node from the collection returned by getDataNodes Signed-off-by: arpitsingh <as00745003@techmahindra.com> Change-Id: I494a5740a53f65376d135fcb9f1e2e8900a2803e
2023-02-01Create plural version of deleteDataNodedanielhanrahan1-6/+1
- Add method to CpsDataService to batch delete data nodes and lists - Use native queries to batch delete fragment entities by xpaths, for data nodes and lists - Add performance tests for batch delete - Refactor FragmentNativeRepository - Add single-column version of createTemporaryTable - Renamed metric cps.data.service.datanode.batch.delete to cps.data.service.datanode.all.delete Issue-ID: CPS-1438 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I1851f9c7ef0b1be4bd421b3352d9697a2dd23f79