aboutsummaryrefslogtreecommitdiffstats
path: root/integration-test
AgeCommit message (Collapse)AuthorFilesLines
2024-07-11Fix timing issue in CmHandleCreateSpecdanielhanrahan1-21/+8
The test for module sync retry on LOCKED handles has a timing issue, due the ordering of the steps. After a LOCKED handle gets reset to ADVISED state (but DMI is not yet set to available), the Module Sync Watchdog may wake up and put it back into LOCKED state again. This fix is to first make the DMI available before waiting for the LOCKED handle to reset. Issue-ID: CPS-2304 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I9d33b0eeea1e0a2e163489130c928b4d03182774
2024-07-10Split integration tests into cps and ncmp packagesdanielhanrahan11-23/+23
Issue-ID: CPS-2309 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ie97c1430d1121c4c68b3fc6dacbc2466d48e1017
2024-07-09NCMP: NCMP search API fixed to handle cps path that is ancestor axis assourabh_sourabh1-1/+2
well - Cps path builder is fixed to handle ancestor axis that is target as well while quering. Issue-ID: CPS-2308 Change-Id: Iaf215851ada17d21516ae83fa142ac77ff1c6c19 Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-07-09Increase module sync wait time in tests to 10 secondsdanielhanrahan1-1/+1
Too small timeout is causing intermittant test failures. Issue-ID: CPS-2304 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ib6a25cb2f44e9a65b8f7d2d98e8d5e7dfe1f9ceb
2024-07-09Merge "Remove forced module sync from NCMP integration tests"Lee Anjella Macabuhay5-54/+30
2024-07-09Merge "Refactor integration tests so only one DmiDispatcher is used"Lee Anjella Macabuhay2-34/+32
2024-07-04Remove forced module sync from NCMP integration testsdanielhanrahan5-54/+30
- remove forced module sync in tests - set module sync timers to 1 second in test application.yml - have tests wait up to 2 seconds for module sync to run Issue-ID: CPS-2304 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I727894dc1b4b9cee1ab82d05a9c31d1e3e067cf3
2024-07-04Refactor integration tests so only one DmiDispatcher is useddanielhanrahan2-34/+32
Issue-ID: CPS-2303 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I4d04fb9b7693a769e9059d3b2b7257a714da0532
2024-07-04refactor cmsubscription codempriyank1-25/+22
- Moved cmsubscription to the impl package instead of api. - Below packages are renamed or newly created for code and tests - moved ..api.cmsubsription to ..impl.cmsubscription - renamed ..api.cmsubscription.mappers to ..impl.cmsubscription.ncmp or dmi as per the functionality - renamed ..api.cmsubscription.model to ..impl.cmsubscription.models - removed ..api.cmsubscription.producer/consumer and classes moved to ..impl.cmsubscription.ncmp/dmi - new package ..impl.cmsubscription.cache to hold cache config and cache operations - new package ..impl.cmsubscription.avc to hold the CmAvcEventConsumer for the notifications emitted as a result of the subscriptions - Removed the prefix CmNotificationSubscription for majority of the classes , not removed for Config and model classes - Renamed the schemas and package structure as per the code refactoring Note: *EventsFacade and *MappersFacade to be removed in the next patchset Issue-ID: CPS-2298 Change-Id: I1d788ab745d65965570e28beaefa511cbe4a8547 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-07-03Fix sonar issue in performance test ResourceMeterdanielhanrahan1-3/+4
Replace busy loop with await().until as suggested by sonar Issue-ID: CPS-89 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ic6c870c419a67708082ceb05ef3ccba884ae375e
2024-07-01Merge "Fix incorrect use of getAnchors(dataspace, schemasets)"Daniel Hanrahan2-4/+4
2024-06-27repackage 'data' featureToineSiebelink2-6/+7
- moved relevant classes into these (new) packages: api.data.exceptions api.data.models impl.data impl.data.async impl.data.exceptions impl.data.models impl.data.utils utils.events - removed old unused event class - moves some missed inventory related class to the right place Issue-ID: CPS-2256 Change-Id: I75563e063acc0054769d8f2b13146e6c1d1c6054 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-06-25Fix incorrect use of getAnchors(dataspace, schemasets)danielhanrahan2-4/+4
There is an issue in a method deleteDataNodes(dataspace, anchors) where it doesn't send data update events. This is because it fetches anchors using a method getAnchors(dataspace, schemaSetNames), when it needs to fetch anchors by name: getAnchors(dataspace, anchorNames) Changes: - Rename getAnchors method using schemasets to getAnchorsBySchemaSetNames - Add a method getAnchors(dataspace, anchorNames) - Update test of deleteDataNodes method using getAnchors so it checks that data update events are sent Issue-ID: CPS-2254 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: I55fe853f0a9278a66a5724bf4cf2723b0e2fbc8b
2024-06-24Repackage Inventory FeatureToineSiebelink5-29/+29
- decided that cm handle queries is part of 'inventory' feature - a lot of files (~100 total) have changes because of some files have been moved. - The reviewers should probably just focus on the MOVED/renamed (~30) files - New packages (top level only): -- org.onap.cps.ncmp.api.inventory -- org.onap.cps.ncmp.impl.inventory -- org.onap.cps.ncmp.impl.models (common models NOT used in API, this was unforeseen) -- org.onap.cps.ncmp.impl.utils - I am NOT updating copyright years as part of this commit since there are no real code changes and it is simply NOT worth the effort TODO: - extend scope to 'TrustLevel' as an 'internal feature' (TBD) Issue-ID: CPS-2255 Signed-off-by: ToineSiebelink <toine.siebelink@est.tech> Change-Id: I40b4efc8326068ab9ae1f31b77f46b2fe8579431
2024-06-21Merge "Introducing NCMP Facades"Sourabh Sourabh4-40/+46
2024-06-21Merge "Spliting a data-job into sub-jobs for DMI Plugin"Sourabh Sourabh1-1/+1
2024-06-20Introducing NCMP FacadesToineSiebelink4-40/+46
- NetworkCmProxyDataService was polluted with many non-data operations - it is now split into: 1) NetworkCmProxyFacade, a single thin facade for the (main) controler to redirect calls to the correct services 2) CmHandleRegistrationService(Impl), methods related to registration only - introduced NetworkCmProxyInventoryFacade for the invenoty controller - renamed some services for consitency and clarification - Use facade to acces ncmp data request handlers (instead of direct from controller) - remove unnecesarry wrappings between request handlers and facade - split facades according to names: data & inventory (the REST controllers are not split properly so I think one rest controller will end up needing both facades) Issue-ID: CPS-2263 Change-Id: I250732aa16ec28b43ff642d2adf10ba36f67290e Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
2024-06-20Bump CPS version to 3.5.1-SNAPSHOTmpriyank1-1/+1
- bump cps version to 3.5.1-SNAPSHOT - updated release notes to make it ready for the next release Issue-ID: CPS-2283 Change-Id: I242cae7c95a87c1a9e225cce3eb7b36097f1e5ba Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-06-20Spliting a data-job into sub-jobs for DMI Pluginleventecsanyi1-1/+1
- algorithm for create sub-job requests - added new method to DmiServiceUrlBuilder to get the write job url - created WriteOperationExaminer, DmiSubJobClient & testware Issue-ID: CPS-2142 Change-Id: I258d334ef346cd388341a1deb4078d24d8bdb7cc Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-06-06CPS Delta API 2: Delta between anchor and payloadArpit Singh1-2/+42
- Second API to get Delta between an anchor and JSON payload - added new API getDeltaByDataspaceAnchorAndPayload - added controller and service layer methods getDeltaByDataspaceAnchorAndPayload - Core Delta algorithm remains same as the first API. getDeltaByDataspaceAnchorAndPayload will call getDeltaBetweenDataNodes Issue-ID: CPS-1836 Signed-off-by: Arpit Singh <as00745003@techmahindra.com> Change-Id: Id74cd930ce48e5cb414aa62c5381b79675788a37
2024-06-05XML content support on update node leavesRudrangi Anupriya5-10/+19
Issue-ID: CPS-2071 Change-Id: Ibe7f59fbfcbb03703626132c6d5c2afde0e7ab4b Signed-off-by: Rudrangi Anupriya <ra00745022@techmahindra.com>
2024-05-31Added OpenTelemetry to CPSdavid.mcweeney1-0/+6
Change-Id: I192fa53e293ea43cdff92ebd44d0382eb290bb76 Signed-off-by: david.mcweeney <david.mcweeney@est.tech> Issue-ID: CPS-2172
2024-05-28Restructure(package) DataJobs feature in NCMP Serviceleventecsanyi2-3/+7
- restructured already existing classes - added testware for AlternateIdMatcher Issue-ID: CPS 2240 Change-Id: I5691ed99627353903689cd2929163f77ed8c4eca Signed-off-by: leventecsanyi <levente.csanyi@est.tech>
2024-05-23Merge "CM SUBSCRIPTION: add new subscription for non existing xpath"Priyank Maheshwari1-4/+23
2024-05-23CM SUBSCRIPTION: add new subscription for non existing xpathemaclee1-4/+23
- added new method for when adding new subscription for non existing xpath but existing cmhandle Issue-ID: CPS-2207 Change-Id: I149fbaea2f276503cb9d45c8807519bbe0417f3b Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
2024-05-21Fix performance build output being losthalil.cakal2-8/+9
- this fix for CpsPath Registry attributes Query plot - also include bump up lombok to latest to fix the error does not have member field com.sun.tools.javac.tree.JCTree qualid - rename conflicting the performance test name: CpsPath Registry attributes Query to fix plot issue Issue-ID: CPS-2232 Change-Id: I7a0536ac2b48565df62fa46dddd27785addafa42 Signed-off-by: halil.cakal <halil.cakal@est.tech>
2024-05-20Merge "CmSubscription topics param update"Lee Anjella Macabuhay1-4/+4
2024-05-17Replaced RestTemplate with WebClient in synchronous DMI callssourabh_sourabh2-3/+5
- added DmiWebClientConfiguration - use WebClient in DmiRestClient - fixed unit tests - encode query params for DMI request - added configurable buffer size - Re-used ncmp.dmi.httpclient.maximumConnectionsTotal parameter (as documented in RTD) to control webclient connection poolsize Issue-ID: CPS-2173 Change-Id: I21584563034d58e8ae3ff3cbcf172e0d14b408fb Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
2024-05-17CmSubscription topics param updatempriyank1-4/+4
- topic application parameters updated to be in sync with the actual convention we are following for the flow. - environment variables also updated to follow the same - removed the unused parameters related to notification Issue-ID: CPS-2210 Change-Id: If5adb3dac1ce81df5afe2e99f99513adc2011cc9 Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-05-16Merge "Integration for getting cm handle by longest alternate id match"Toine Siebelink4-0/+97
2024-05-15Merge "More fine tuning around remainin plots"Toine Siebelink3-4/+4
2024-05-15More fine tuning around remainin plotshalil.cakal3-4/+4
- Fine tuning for the plots only: - Read datatrees for multiple xpaths - Query with all descendants - Writing 200 devices - Saving list of 50 devices Issue-ID: CPS-2192 Change-Id: I508e31cd861a4006cac41ebbbe307b7bd2acde2f Signed-off-by: halil.cakal <halil.cakal@est.tech>
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-15Bump CPS to 3.5.0-SNAPSHOTmpriyank1-1/+1
- bump cps to 3.5.0-SNAPSHOT Issue-ID: CPS-2228 Change-Id: I8a6d7e702b557d5b90dd384bbe429de4958ef77f Signed-off-by: mpriyank <priyank.maheshwari@est.tech>
2024-05-14Merge "CPS Bump to 3.4.10-SNAPSHOT"Daniel Hanrahan1-1/+1
2024-05-14CPS Bump to 3.4.10-SNAPSHOTmpriyank1-1/+1
- bumping CPS to 3.4.10-SNAPSHOT version Issue-ID: CPS-2221 Change-Id: I8513582791078762bfb9d828966028c233e031db Signed-off-by: mpriyank <priyank.maheshwari@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_sourabh14-214/+247
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-05-01Bump CPS versiondanielhanrahan1-1/+1
- bump cps to 3.4.9-SNAPSHOT - also updated the release notes Issue-ID: CPS-2205 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Ifd7feb413baac30e3cbbdf2aeaac5fbb5ae2e463
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-04-04Merge "Add integration tests of NCMP REST API"Toine Siebelink1-0/+95