From 6c35c5dd0dbfc417a57bad71c22b03f21cb71e5f Mon Sep 17 00:00:00 2001 From: mpriyank Date: Fri, 3 May 2024 10:48:04 +0100 Subject: Schedule response to client - Scheduling sending the response by reading whatever is present in the cache for subscription after a pre-configured time. - Also added test validation for the same Issue-ID: CPS-2209 Change-Id: Ifacb0b12734a0529e671b0b63836189a243e453c Signed-off-by: mpriyank --- .../service/CmNotificationSubscriptionHandlerServiceImplSpec.groovy | 3 +++ 1 file changed, 3 insertions(+) (limited to 'cps-ncmp-service/src/test') diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/cmsubscription/service/CmNotificationSubscriptionHandlerServiceImplSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/cmsubscription/service/CmNotificationSubscriptionHandlerServiceImplSpec.groovy index 7d1a1d65fa..98b4ee2671 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/cmsubscription/service/CmNotificationSubscriptionHandlerServiceImplSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/cmsubscription/service/CmNotificationSubscriptionHandlerServiceImplSpec.groovy @@ -72,6 +72,9 @@ class CmNotificationSubscriptionHandlerServiceImplSpec extends Specification{ and: 'the events handler method to publish DMI event is called correct number of times with the correct parameters' testSubscriptionDetailsMap.size() * mockCmNotificationSubscriptionEventsHandler.publishCmNotificationSubscriptionDmiInEvent( "test-id", "dmi-1", "subscriptionCreateRequest", testDmiInEvent) + and: 'we schedule to send the response after configured time from the cache' + 1 * mockCmNotificationSubscriptionEventsHandler.publishCmNotificationSubscriptionNcmpOutEvent( + "test-id", "subscriptionCreateResponse", null, true) } def 'Consume valid and but non-unique CmNotificationSubscription create message'() { -- cgit