Merge "Add memory usage to integration tests [UPDATED]"
[cps.git] / cps-ncmp-service / src / test / groovy / org / onap / cps / ncmp / api / inventory / sync / ModuleSyncWatchdogSpec.groovy
index 94ee6ea..390e88b 100644 (file)
@@ -45,7 +45,9 @@ class ModuleSyncWatchdogSpec extends Specification {
 
     def spiedAsyncTaskExecutor = Spy(AsyncTaskExecutor)
 
-    def objectUnderTest = new ModuleSyncWatchdog(mockSyncUtils, moduleSyncWorkQueue , mockModuleSyncStartedOnCmHandles, mockModuleSyncTasks, spiedAsyncTaskExecutor)
+    def moduleSetTagCache = Mock(IMap<String, Set<String>>)
+
+    def objectUnderTest = new ModuleSyncWatchdog(mockSyncUtils, moduleSyncWorkQueue , mockModuleSyncStartedOnCmHandles, mockModuleSyncTasks, spiedAsyncTaskExecutor, moduleSetTagCache)
 
     void setup() {
         spiedAsyncTaskExecutor.setupThreadPool()
@@ -109,7 +111,7 @@ class ModuleSyncWatchdogSpec extends Specification {
     def 'Reset failed cm handles.'() {
         given: 'sync utilities returns failed cm handles'
             def failedCmHandles = [new YangModelCmHandle()]
-            mockSyncUtils.getModuleSyncFailedCmHandles() >> failedCmHandles
+            mockSyncUtils.getCmHandlesThatFailedModelSyncOrUpgrade() >> failedCmHandles
         when: 'reset failed cm handles is started'
             objectUnderTest.resetPreviouslyFailedCmHandles()
         then: 'it is delegated to the module sync task (service)'