aboutsummaryrefslogtreecommitdiffstats
path: root/integration-test/src
AgeCommit message (Collapse)AuthorFilesLines
2024-05-15Integration for getting cm handle by longest alternate id matchsourabh_sourabh4-0/+97
- Added a new integration test to check total time and memory taken to get cm handle by its longest match alternate id. Issue-ID: CPS-2176 Change-Id: I7a6b299c46803a0878406f1e16fdae970b361dd9 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-05-13Adjust percentage limits to 10 percent below the thresholdhalil.cakal8-66/+66
Issue-ID: CPS-2192 Change-Id: Iac37751b17f186e550ce12e3e17968d90cbf432a Signed-off-by: halil.cakal <halil.cakal@est.tech>
2024-05-09Fine tuning of the performance plotshalil.cakal6-37/+37
- Fine tune some of the performance plots which are not align to the limit Issue-ID: CPS-2200 Change-Id: I925443aa74a4eb814728d0642db0951c76f86186 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2024-05-03Make NCMP integration tests use MockWebServersourabh_sourabh13-195/+227
Change from using MockRestServiceServer - which is only compatible with RestTemplate - to MockWebServer, which will allow tests to work using WebClient instead of RestTemplate. Issue-ID: CPS-2183 Change-Id: I7494fe17cba6e92f7df81f0fd0185e1d2b5a5541 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-04-30Reverted web client changes as it breaking CPS functionality:sourabh_sourabh6-14/+0
1. Error handling not working 2. Unable to make dmi call as url appens extra "/" Commit 1: Replace RestTemplate with WebClient in synchronous DMI calls - added DmiWebClientConfiguration - use WebClient in DmiRestClient - fixed unit tests - ingnored failing NCMP related integration tests (related to WebClient, will be fixed in a future patch) - encode query params for DMI requests Commit 2: Module sync task failing with WebClient - added configurable buffer size Commit 3: Re-use ncmp.dmi.httpclient.maximumConnectionsTotal parameter (as documented in RTD) to control webclient connection poolsize Issue-ID:CPS-989, CPS-2195, CPS-2198 Change-Id: I6c71ab2801b222708404f51bd60f2b3031ebf32e Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-04-29Ajust time limits for performance testshalil.cakal8-72/+66
- new time limits adjusted for dedicated physical cps-performance test-server Issue-ID: CPS-2192 Change-Id: Ia258a8f7460b3fbe68e5b3b61bc918f7d394c1b1 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2024-04-26Module sync task failing with WebClientleventecsanyi1-0/+1
- added configurable buffer size Issue-ID: CPS-2195 Change-Id: I7cdb09856fd4d80134a91e54faa7e6600f3721dc Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-04-26Faster module searches (CPS-2190 #3)danielhanrahan1-3/+3
This greatly improves performance of module searches by eliminating unneeded SQL queries via Hibernate lazy fetching. Issue-ID: CPS-2190 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ie9e65017d0027366456f1741cc37b10679317b25
2024-04-25[BUG] Remove slow validation check during module search (CPS-2190 #2)danielhanrahan2-9/+5
The check for existing modules is extremely slow, being dependent on the file sizes of the Yang modules being queries. The validation check is also completely unnecessary, since it simply ignores any exceptions and returns an empty set, which the main logic does implicitly. (The Dataspace check is also not needed, as the NCMP dataspace is guaranteed to exist.) Issue-ID: CPS-2190 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I329c1f8aac3f50bda0333e6c9c686f47af2e009f
2024-04-25Perf Test for Module Search is dependent on module size (CPS-2190 #1)danielhanrahan1-0/+113
Add a new test showing that Yang module search is dependent on the file size of the Yang modules being searched for. Issue-ID: CPS-2190 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I8fd28f4c91be11ef7428251397a887af17649015
2024-04-25Replace RestTemplate with WebClient in synchronous DMI callsleventecsanyi5-0/+13
- added DmiWebClientConfiguration - use WebClient in DmiRestClient - fixed unit tests - ingnored failing NCMP related integration tests (related to WebClient, will be fixed in a future patch) - encode query params for DMI requests Issue-ID:CPS-989 Change-Id: I26434568f68266e95669a51c134978ddd197d802 Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-04-23[BUG] Make failed async task report failure on Kafka topicdanielhanrahan1-3/+3
- In event of async task timeout, error code 102 (DMI_SERVICE_NOT_RESPONDING) is sent to client topic. - In event of unexpected error (such as database unavailable), error code 108 (UNKNOWN_ERROR) is sent to client topic. - The default timeouts have been adjusted so that the task timeout (60s) is longer than the HTTP and Database timeouts (30s), so that expected codes are returned. Issue-ID: CPS-2186 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I84c3447a625e084c445ab2f5c01e2b32a0c971ac
2024-04-17Cm Subscription: Remove subscription methodemaclee1-6/+35
- method to remove a subscription Id from leaflist - condition if subscription list is empty, remove subscription all together Issue-ID: CPS-2164 Change-Id: Id694f441f9675fa9a048e3b824e1f02fae73f87e Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-03-28Add integration tests of NCMP REST APIdanielhanrahan1-0/+95
Add some tests using MockMvc of NCMP REST API: - CM handle registration - CM handle ID searches - CM handle deregistration Issue-ID: CPS-2033 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I493aca8c3f8c263f5a50f6a2c66e317b9a6e08aa
2024-03-28[BUG] Mock DMI will respond to Health Checks during testsdanielhanrahan4-30/+42
Health Check for DMI is sometimes running during integration tests, causing the mockDmiServer to fail due to unexpected Rest requests. As a fix, the mock DMI will respond to health checks. Issue-ID: CPS-2167 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ie4a0059583e66dfcc00e1aa998671a662ccf053a
2024-03-26Merge "Code review cleanup for: Add kafka messaging support to integration ↵Lee Anjella Macabuhay2-12/+15
test module"
2024-03-25Code review cleanup for: Add kafka messaging support to integration test modulehalil.cakal2-12/+15
- Address code review on commit which already merged https://gerrit.onap.org/r/c/cps/+/137496 Issue-ID: CPS-2152 Change-Id: I7a46dd08c919227c37fdeacf4763d0ab364c88c1 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2024-03-25Merge "Save new cm notification subscription"Priyank Maheshwari1-0/+46
2024-03-22Save new cm notification subscriptionemaclee1-0/+46
Issue-ID: CPS-2043 Change-Id: If1c066a7d1c1f7e1c154714fe06f2566b727634c Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-03-19Merge "Add kafka messaging support to integration test module"Toine Siebelink3-4/+112
2024-03-19Add kafka messaging support to integration test modulehalil.cakal3-4/+112
- add ncmp test using kafka to integration test suite Issue-ID: CPS-2152 Change-Id: Ia486bbcf1590ecf3ec6cbc2f513b74d55e4d6a31 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2024-03-14Merge "Performance tests of alternate-id/module-set-tag lookup"Toine Siebelink7-22046/+185
2024-03-13Provide support for data producer identifier during registration (CPS-1964 1)JvD_Ericsson2-1/+9
- Added support for the dataProducerIdentifier to be added, and updated from blank to something once - The dataProducerIdentifier is persisted in the DB Issue-ID: CPS-2105 Signed-off-by: JvD_Ericsson <jeff.van.dam@est.tech> Change-Id: I1c230be8f9402154a761e8c2ba4d8a6331965b3c
2024-03-08Performance tests of alternate-id/module-set-tag lookupdanielhanrahan7-22046/+185
- Add some tests of CPS get/query operations comparing look up of cm-handle id vs alternate-id - Add test of querying all CM handles by module-set-tag - Test accuracy is improved by performing warmup operations (reported results are faster with more warmup iterations) Issue-ID: CPS-2087 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I4214e157ccf93f751c69b8a17d55f4185749ca90
2024-03-06Merge "Test of retry of failed module sync"Toine Siebelink3-18/+78
2024-03-05Integration test of Bearer Token pass-through (CPS-2126 #5)danielhanrahan3-2/+132
This covers REST endpoints of GET, POST, PUT, PATCH, DELETE of /ncmp/v1/ch/{cmHandleId}/data/ds/{datastoreName} and the async REST endpoint of POST /ncmp/v1/data It verifies that: - bearer token is passed from NCMP to DMI - basic auth header is not passed from NCMP to DMI Issue-ID: CPS-2137 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ie4761a848904175a9d8cd5b917817e85f5b69813
2024-02-27Test of retry of failed module syncdanielhanrahan3-18/+78
A new integration test verifies that LOCKED handles that failed module sync will be retried after a few minutes. Issue-ID: CPS-2033 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: If194daeb315090f2710a017270875b6301f7140a
2024-02-23Remove subscriptionModelLoader flagmpriyank1-1/+0
- removed the flag as the functionality around model loader is stable now - removed the config parameter from the application yaml file as well Issue-ID: CPS-2112 Change-Id: Ie4e3317c0689615b900dcd9bbf1896bc3a5f37b3 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-02-21Upgrade yang modules using module set tagdanielhanrahan1-3/+0
- New algorithm is implemented as per the pseudo code -> https://wiki.onap.org/display/DW/CPS-1733%3A+Upgrade+YANG+Schema-Set+for+CM+Handle+Using+a+Module+Set+Tag Issue-ID: CPS-2027 Change-Id: I78fc1c8f927de1a1b814c3c1c62351dda58f2139 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech> Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
2024-02-21Add moduleSetTag when getting a CM handledanielhanrahan2-4/+19
Test changes: - Check moduleSetTag (and alternateId) in unit test of get CM handle. - Verify moduleSetTag is updated in tests of CM handle upgrade. Code changes: - Set moduleSetTag when converting a YangModelCmHandle to NcmpServiceCmHandle. - Set moduleSetTag in YangModelCmHandle copy constructor. - Minor refactor using StringUtils::isBlank. Issue-ID: CPS-2027 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I6a9a92aa58d15c6ecf5a6bb21aa5c9d6ec8dc817
2024-02-19Tests of CM-handle module upgrade & moduleSetTagdanielhanrahan10-244/+429
Integration tests covering scenarios of the creation and upgrade of CM-handles with: - no moduleSetTag - new moduleSetTag - existing moduleSetTag Failing tests are marked @Ignore. Issue-ID: CPS-2102 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Id5567e08a13d8c26dc7b6458f0af8449bef6f082
2024-02-15Add NCMP to integration-test moduledanielhanrahan5-0/+347
- Add NCMP to integration test base class - Use MockRestServiceServer to mock DMI responses in groovy tests - Added tests for CM-handle registration to READY and LOCKED states - Add test of CM-handle deregistration Issue-ID: CPS-2033 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I89f9f8aab2bba9d4eb5b3136a2feb238e7cf1b06
2024-02-14Clean up of integration-test base classesdanielhanrahan4-171/+104
- Remove TestConfig and instead use auto-configuration - Add needed application.yml config - Refactor helper methods for creating JSON Issue-ID: CPS-2090 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I4f618a1d4a83e9c75e468928c257b817d449c22f
2024-02-13Remove liquibase test changelogdanielhanrahan2-629/+1
Complete liquibase changelog takes under 1 second to run, so having separate changelog for integration tests offers no benefit. Issue-ID: CPS-2090 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ib0e928f35d401b91c23dfcb5dc82c77778a044dc
2024-02-12Fix test failure by ordering leaf-listsdanielhanrahan3-9/+41
YANG specifies two ways that leaf-lists can be ordered: - ordered-by user: original order in JSON is preserved - ordered-by system (default): it is up to the system how to order For leaf-lists to preserve same order as the JSON, the Yang module must specify 'ordered-by user'. To ensure consistent behaviour even when system ordering is used, the leaf-list is sorted during parsing. - Add 'ordered-by user' to authors field in bookstore.yang - Sort leaf-list during parsing when using 'ordered-by system' - Add new tests to verify ordering Issue-ID: CPS-2057 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I6ab688ec2fa4a22182e853d1a8b26642f278c40a
2024-02-12Include integration test results in Jacocodanielhanrahan1-1/+0
integration-test module is not recording code coverage due to incorrectly overriding the maven surefire config from parent pom. Issue-ID: CPS-2086 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I774c64acedca546f5c01403597bd9f5010de73d2
2024-02-01Add integration test for extending API: Get Module Definitionshalil.cakal9-44/+89
- Add new module: bookstore-types - Import the new module from stores module - Change integration testwares to comply with the new module - Add new integration test for retrieving module definition Issue-ID: CPS-1135 Change-Id: Ib51c998ceeab50d3fcea212ed55c8ab50ca09257 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2024-02-01Extend API: Get Module Definitionshalil.cakal1-2/+12
- add query parameters: module-name and revision to OpenAPI - extend the controller method to hande the new parameters - add the new method stack to the service layer - extend the SQL query to support the new parameters - add unit and integration testwares Issue-ID: CPS-1135 Change-Id: I089ad2ad71effb58ac0ba809e9f441d6cdb59c4f Signed-off-by: halil.cakal <halil.cakal@est.tech>
2024-01-18Merge "CPS Delta API: Update action for delta service"Toine Siebelink2-29/+76
2024-01-17Clear instance based Schema Context Cache upon validation errorsToineSiebelink2-6/+22
- retry yang parser exceptions one time by clearing cache - split yangUtils into YangParserHelper (instance based) and YangUtils for non-parsering static methods - removed public methods only used from test. Refactored to use variation with (empty) parent path - removed use of optional for parentPath, easier to handle with just an empty string! - make methods no longer used in production code in YangUtils are private - udpate testware to use proper public methods instead of private methods of yang utils / parser (helper) Issue-ID:CPS-2000 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I0c7590a5e1495d047006e7136f1bd873be37f7b0
2024-01-16CPS Delta API: Update action for delta serviceArpit Singh2-29/+76
- Added code for Update action in Delta service - added method to get updated Leaf data: getUpdatedLeavesBetweenSourceAndTargetDataNode - added method to compare Leaf data common in source and target data node - added method to process leaves unique to target data node - added method to compare leaves: compareLeaves - added method to store updated data to a DeltaReport: addUpdatedLeavesToDeltaReport - Added corresponding testware Issue-ID: CPS-1824 Signed-off-by: Arpit Singh <as00745003@techmahindra.com> Change-Id: I3de07ea3227988784a0892f6a92c238ecf00a7fa
2024-01-11Merge "Enable hibernate write batching"Lee Anjella Macabuhay7-35/+42
2024-01-10Enable hibernate write batchingdanielhanrahan7-35/+42
- Implement fragment ID sequence generator with allocation size of 100 - Enable write batching for insert and update, with batch size of 100 - Write performance is over 2x faster Issue-ID: CPS-1795 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I7ebd0f834abb57c593603e2cd3fafc7e3425ab1e
2024-01-09Remove inefficient saveListElementsBatch APIdanielhanrahan2-39/+9
CpsDataService::saveListElementsBatch method is not needed as saveListElements supports saving multiple list elements in a single operation. This both simplifies implementation and greatly improves performance when saving list elements, as the Yang parser need only run once for the whole batch. - Change InventoryPersistence to save CM-handles in batches of 100 using existing CpsDataService::saveListElements method. - Remove not needed CpsDataService::saveListElementBatch. Issue-ID: CPS-2019 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I8b74dda2917e094d064b42f2c0e4d57029b90395
2024-01-05Merge "Normalize JSON attributes during update"Toine Siebelink1-5/+5
2024-01-04Add performance tests for saveListElementsdanielhanrahan1-14/+75
Add performance tests for CpsDataService methods: - saveListElements - saveListElementsBatch Results show that saveListElementsBatch (used only by NCMP for saving CM-handles) has extremely poor performance compared to saveListElements, which is over 4x faster and uses less memory. Issue-ID: CPS-2019 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I89d634c69b3790f1e1a79e2ff5392db5a45c761b
2024-01-04Normalize JSON attributes during updatedanielhanrahan1-5/+5
This change fixes a few issues related to JSON encoding of FragmentEntity attributes (data leaves). This significantly improves update performance in cases of partial updates. - Normalize JSON and order leaves by name when comparing data leaves during update operations. - Update performance test timings. Issue-ID: CPS-2018 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ia764a353bf96c05758827845e1358745247ee237
2023-12-22CpsDataService Update performance testsdanielhanrahan1-42/+106
Test suite for CpsDataService update methods: - updateDataLeaves - updateDataNodeAndDescendants - replaceListContent Added JVM warmup for update tests Issue-ID: CPS-1674 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ia07d792bef63fbe2d376a16c210d9d0c4425e302
2023-12-22Fix performance tests after anchor/dataspace splitdanielhanrahan1-2/+2
CpsAdminService was split into CpsDataspaceService and CpsAnchorService. One test has incorrect changes. Issue-ID: CPS-871 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I8013c4d9d17a5846d183e1c06bc11fa5ef9b4c4d
2023-12-18Remove the dependency-cycle between beansToineSiebelink12-105/+159
- Splitting admin service into AnchorService and DataspaceService (this resolves the cyclic dependency) - Improved Delete dataspace integration error tests (were depending on execution order, now independent) Issue-ID: CPS-871 Change-Id: I47efedb6eb4bd2900f72d689616b7b7b62df2938 Signed-off-by: halil.cakal <halil.cakal@est.tech> Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>