Add multi-threaded Integration Test for Module Sync 27/139227/6
authorToineSiebelink <toine.siebelink@est.tech>
Thu, 17 Oct 2024 13:08:58 +0000 (14:08 +0100)
committerToineSiebelink <toine.siebelink@est.tech>
Thu, 24 Oct 2024 11:37:27 +0000 (12:37 +0100)
commit40f7666f1fadcf0103cbb846726e91df1f89c8fe
tree2a9853af8733dfff207f76443fdd065ae698c01a
parente0c537f4463b6664e108e12962e1f4b34544776c
Add multi-threaded Integration Test for Module Sync

- Add tests for multi threaded scenarios around module sync
- Disabled ModuleSyncWatchdog timer using long delay and interval
- Call Module Sync method as needed for more control
  (sometimes it needs to be triggered twice like retry use cases as designed)
- Improve NCMP performance test setup (consistent naming etc.)
- Rename some production code method names to better reflect functionality
- Disabled intermittent failing test for create cm handle as it is not asserting the correct message
- Improved Code Coverage ModuleSyncWatchdog

Issue-ID: CPS-2462
Change-Id: Ia907af77d2037309f1bbb73ea671679b788bab9e
Signed-off-by: ToineSiebelink <toine.siebelink@est.tech>
23 files changed:
cps-ncmp-rest/src/main/java/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryController.java
cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyInventoryControllerSpec.groovy
cps-ncmp-rest/src/test/groovy/org/onap/cps/ncmp/rest/controller/NetworkCmProxyRestExceptionHandlerSpec.groovy
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/inventory/NetworkCmProxyInventoryFacade.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/CmHandleRegistrationService.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncWatchdog.java
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/utils/Sleeper.java [new file with mode: 0644]
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/CmHandleRegistrationServiceSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/NetworkCmProxyInventoryFacadeSpec.groovy
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncWatchdogSpec.groovy
integration-test/src/test/groovy/org/onap/cps/integration/base/CpsIntegrationSpecBase.groovy
integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/CmHandleCreateSpec.groovy
integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/CmHandleUpdateSpec.groovy
integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/CmHandleUpgradeSpec.groovy
integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/ModuleSyncWatchdogIntegrationSpec.groovy [new file with mode: 0644]
integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/RestApiSpec.groovy
integration-test/src/test/groovy/org/onap/cps/integration/performance/base/NcmpPerfTestBase.groovy
integration-test/src/test/resources/application-module-sync-delayed.yml [new file with mode: 0644]
integration-test/src/test/resources/application.yml
integration-test/src/test/resources/data/inventory/cmHandleTemplate.json [moved from integration-test/src/test/resources/data/ncmp-registry/innerNode.json with 86% similarity]
integration-test/src/test/resources/data/inventory/cmHandleWithAlternateIdTemplate.json [moved from integration-test/src/test/resources/data/ncmp-registry/innerCmHandleNode.json with 100% similarity]
integration-test/src/test/resources/data/inventory/dmi-registry@2024-02-23.yang [moved from integration-test/src/test/resources/data/ncmp-registry/dmi-registry@2024-02-23.yang with 100% similarity]
policy-executor-stub/src/main/java/org/onap/cps/policyexecutor/stub/controller/Sleeper.java