From 7ff089b982cf195b2ec599e1cf6df441bcc21138 Mon Sep 17 00:00:00 2001 From: sourabh_sourabh Date: Wed, 11 Sep 2024 16:51:01 +0100 Subject: Retry mechanism (with back off algorithm) is removed with more frequent watchdog poll - Increased watchdog frequency for locked cm handle. - Removed retry backoff algorithm for locked cm handle. Issue-ID: CPS-2395 Change-Id: I54d0ec8f9de53a7d181639c14aaaa93736f03e19 Signed-off-by: sourabh_sourabh --- .../functional/ncmp/CmHandleCreateSpec.groovy | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'integration-test/src/test/groovy/org') diff --git a/integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/CmHandleCreateSpec.groovy b/integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/CmHandleCreateSpec.groovy index d27badccb2..10a9f15e21 100644 --- a/integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/CmHandleCreateSpec.groovy +++ b/integration-test/src/test/groovy/org/onap/cps/integration/functional/ncmp/CmHandleCreateSpec.groovy @@ -180,17 +180,20 @@ class CmHandleCreateSpec extends CpsIntegrationSpecBase { }) when: 'DMI is available for retry' - dmiDispatcher1.moduleNamesPerCmHandleId = ['ch-1': ['M1', 'M2']] + dmiDispatcher1.moduleNamesPerCmHandleId = ['ch-1': ['M1', 'M2'], 'ch-2': ['M1', 'M2']] dmiDispatcher1.isAvailable = true - and: 'the LOCKED CM handle retry time elapses (actually just subtract 3 minutes from handles lastUpdateTime)' - overrideCmHandleLastUpdateTime('ch-1', OffsetDateTime.now().minusMinutes(3)) - then: 'CM-handle goes to READY state' + then: 'Both CM-handles go to READY state' new PollingConditions().within(MODULE_SYNC_WAIT_TIME_IN_SECONDS, () -> { - assert objectUnderTest.getCmHandleCompositeState('ch-1').cmHandleState == CmHandleState.READY + ['ch-1', 'ch-2'].each { cmHandleId -> + assert objectUnderTest.getCmHandleCompositeState(cmHandleId).cmHandleState == CmHandleState.READY + } }) - and: 'CM-handle has expected modules' - assert ['M1', 'M2'] == objectUnderTest.getYangResourcesModuleReferences('ch-1').moduleName.sort() + + and: 'Both CM-handles have expected modules' + ['ch-1', 'ch-2'].each { cmHandleId -> + assert objectUnderTest.getYangResourcesModuleReferences(cmHandleId).moduleName.sort() == ['M1', 'M2'] + } cleanup: 'deregister CM handles' deregisterCmHandles(DMI1_URL, ['ch-1', 'ch-2']) -- cgit 1.2.3-korg