Fix build issue with subscription 09/137709/2
authoremaclee <lee.anjella.macabuhay@est.tech>
Thu, 18 Apr 2024 09:43:05 +0000 (10:43 +0100)
committerLee Anjella Macabuhay <lee.anjella.macabuhay@est.tech>
Thu, 18 Apr 2024 10:00:47 +0000 (10:00 +0000)
Issue-ID: CPS-2164
Change-Id: I49a18df0927b5beff62a12f9bc2a2e8e486537c9
Signed-off-by: emaclee <lee.anjella.macabuhay@est.tech>
cps-ncmp-service/src/main/java/org/onap/cps/ncmp/api/impl/events/cmsubscription/DmiCmNotificationSubscriptionCacheHandler.java
cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/cmsubscription/DmiCmNotificationSubscriptionCacheHandlerSpec.groovy

index 8c1cac3..4b3a085 100644 (file)
@@ -119,8 +119,8 @@ public class DmiCmNotificationSubscriptionCacheHandler {
 
             for (final String cmHandle: cmHandles) {
                 for (final String xpath: xpaths) {
-                    cmNotificationSubscriptionPersistenceService.addOrUpdateCmNotificationSubscription(datastoreType,
-                        cmHandle, xpath, subscriptionId);
+                    cmNotificationSubscriptionPersistenceService.addCmNotificationSubscription(datastoreType, cmHandle,
+                            xpath, subscriptionId);
                 }
             }
         }
index 47a1c89..10e060f 100644 (file)
@@ -139,7 +139,7 @@ class DmiCmNotificationSubscriptionCacheHandlerSpec extends MessagingBaseSpec {
         when: 'subscription is persisted in database'
             objectUnderTest.persistIntoDatabasePerDmi(subscriptionId,'dmi-1')
         then: 'persistence service is called the correct number of times per dmi'
-            4 * mockCmNotificationSubscriptionPersistenceService.addOrUpdateCmNotificationSubscription(_,_,_,subscriptionId)
+            4 * mockCmNotificationSubscriptionPersistenceService.addCmNotificationSubscription(_,_,_,subscriptionId)
     }
 
     def setUpTestEvent(){