diff options
author | sourabh_sourabh <sourabh.sourabh@est.tech> | 2022-09-08 12:35:04 +0100 |
---|---|---|
committer | Sourabh Sourabh <sourabh.sourabh@est.tech> | 2022-09-13 15:06:23 +0000 |
commit | 86b5cee2920672726bd66df0775198f57f29b8cc (patch) | |
tree | 011c9e0dd122c61cee832fb9ac943d7f3fa67bfb /cps-ncmp-service/src/test/groovy/org | |
parent | ae5a47388dae38c51b437e448ae6a23fa9a77591 (diff) |
CmHandle registration/module sync watchdog performance improvment
- Tuned CPS DB parameters
- Removed deprecated CPS DB parameter
- Modified module sync watch logic
- Added aditional logs
- Removed logic to get FragmentEntities as stream
- Removed detaching of fragment entity as it was causing NCMP to break with an exception "SQLSTATE(08006)"
Issue-ID: CPS-1126
Signed-off-by: sourabh_sourabh <sourabh.sourabh@est.tech>
Change-Id: I0bde11895f754602dece132efde701d82b377f12
Diffstat (limited to 'cps-ncmp-service/src/test/groovy/org')
-rw-r--r-- | cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncWatchdogSpec.groovy | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncWatchdogSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncWatchdogSpec.groovy index e5240c0e66..dd989bf676 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncWatchdogSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/inventory/sync/ModuleSyncWatchdogSpec.groovy @@ -52,20 +52,19 @@ class ModuleSyncWatchdogSpec extends Specification { def 'Module sync advised cm handles with #scenario.'() { given: 'sync utilities returns #numberOfAdvisedCmHandles advised cm handles' mockSyncUtils.getAdvisedCmHandles() >> createDataNodes(numberOfAdvisedCmHandles) - and: 'the executor has #parallelismLevel available threads' - spiedAsyncTaskExecutor.getAsyncTaskParallelismLevel() >> parallelismLevel + and: 'the executor has enough available threads' + spiedAsyncTaskExecutor.getAsyncTaskParallelismLevel() >> 3 when: ' module sync is started' objectUnderTest.moduleSyncAdvisedCmHandles() then: 'it performs #expectedNumberOfTaskExecutions tasks' expectedNumberOfTaskExecutions * spiedAsyncTaskExecutor.executeTask(*_) where: ' the following parameter are used' - scenario | parallelismLevel | numberOfAdvisedCmHandles || expectedNumberOfTaskExecutions - 'less then 1 batch' | 9 | 1 || 1 - 'exactly 1 batch' | 9 | ModuleSyncWatchdog.MODULE_SYNC_BATCH_SIZE || 1 - '2 batches' | 9 | 2 * ModuleSyncWatchdog.MODULE_SYNC_BATCH_SIZE || 2 - 'queue capacity' | 9 | testQueueCapacity || 3 - 'over queue capacity' | 9 | testQueueCapacity + 2 * ModuleSyncWatchdog.MODULE_SYNC_BATCH_SIZE || 3 - 'not enough threads' | 2 | testQueueCapacity || 2 + scenario | numberOfAdvisedCmHandles || expectedNumberOfTaskExecutions + 'less then 1 batch' | 1 || 1 + 'exactly 1 batch' | ModuleSyncWatchdog.MODULE_SYNC_BATCH_SIZE || 1 + '2 batches' | 2 * ModuleSyncWatchdog.MODULE_SYNC_BATCH_SIZE || 2 + 'queue capacity' | testQueueCapacity || 3 + 'over queue capacity' | testQueueCapacity + 2 * ModuleSyncWatchdog.MODULE_SYNC_BATCH_SIZE || 3 } def 'Reset failed cm handles.'() { |