diff options
author | 2025-02-07 14:25:05 +0000 | |
---|---|---|
committer | 2025-02-07 15:16:07 +0000 | |
commit | b259b50361c7d844b8e62946463053752dcbc522 (patch) | |
tree | 4202cba0c855032200993988cab2aab57352d638 /cps-ncmp-service/src | |
parent | 85b8a41a73b8384012c082c077167d2709ef9680 (diff) |
Fix for intermittent failures of module sync tests
- Removed PollingConditions as ModuleSyncWatchdog is now synchronous
- Use Hazelcast IMap::delete instead of IMap::removeAsync to fix root
cause of test failures: removeAsync may not be finished when module
sync is re-run during tests.
Issue-ID: CPS-2615
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I1786a1303606132218dc8e4e91fb58e6f6cc0bcb
Diffstat (limited to 'cps-ncmp-service/src')
2 files changed, 3 insertions, 3 deletions
diff --git a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncTasks.java b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncTasks.java index b727e79e70..f8f023e0f8 100644 --- a/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncTasks.java +++ b/cps-ncmp-service/src/main/java/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncTasks.java @@ -115,8 +115,8 @@ public class ModuleSyncTasks { } private void removeResetCmHandleFromModuleSyncMap(final String resetCmHandleId) { - moduleSyncStartedOnCmHandles.removeAsync(resetCmHandleId); - log.info("{} will be removed asynchronously from in progress map", resetCmHandleId); + moduleSyncStartedOnCmHandles.delete(resetCmHandleId); + log.info("{} removed from in progress map", resetCmHandleId); } private static boolean isCmHandleInAdvisedState(final YangModelCmHandle yangModelCmHandle) { diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncTasksSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncTasksSpec.groovy index 98f3cc05bb..a2f38c89eb 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncTasksSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/impl/inventory/sync/ModuleSyncTasksSpec.groovy @@ -184,7 +184,7 @@ class ModuleSyncTasksSpec extends Specification { def loggingEvent = getLoggingEvent() assert loggingEvent.level == Level.INFO and: 'the log indicates the cm handle entry is removed successfully' - assert loggingEvent.formattedMessage == 'ch-1 will be removed asynchronously from in progress map' + assert loggingEvent.formattedMessage == 'ch-1 removed from in progress map' } def 'Sync and upgrade CM handle if in upgrade state for #scenario'() { |