diff options
author | 2023-06-20 18:19:59 +0100 | |
---|---|---|
committer | 2023-06-21 12:24:13 +0100 | |
commit | 4110a6b1d9de96b4f35cf696dc340d2419976cbb (patch) | |
tree | ca1f07db3a06454c7430c221e70913cd29fa1898 /cps-ncmp-service/src/test | |
parent | 43e3e06f795a46c392004af1acb97db3b2f2cfb6 (diff) |
publishLcmEventBatchAsynchronously is not async
Spring @Async has a limitation where calling the async method from
within the same class won't work, as the method needs to be proxied,
and calling from the same class bypasses the proxy and calls the
underlying method directly, thus running synchronously.
Issue-ID: CPS-1749
Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech>
Change-Id: I7f198487dc18b359654dc38b5cf8fd600d33e189
Diffstat (limited to 'cps-ncmp-service/src/test')
-rw-r--r-- | cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/lcm/LcmEventsCmHandleStateHandlerImplSpec.groovy | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/lcm/LcmEventsCmHandleStateHandlerImplSpec.groovy b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/lcm/LcmEventsCmHandleStateHandlerImplSpec.groovy index e449d65ac..bfebc44ba 100644 --- a/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/lcm/LcmEventsCmHandleStateHandlerImplSpec.groovy +++ b/cps-ncmp-service/src/test/groovy/org/onap/cps/ncmp/api/impl/events/lcm/LcmEventsCmHandleStateHandlerImplSpec.groovy @@ -39,7 +39,8 @@ class LcmEventsCmHandleStateHandlerImplSpec extends Specification { def mockLcmEventsCreator = Mock(LcmEventsCreator) def mockLcmEventsService = Mock(LcmEventsService) - def objectUnderTest = new LcmEventsCmHandleStateHandlerImpl(mockInventoryPersistence, mockLcmEventsCreator, mockLcmEventsService) + def lcmEventsCmHandleStateHandlerAsyncHelper = new LcmEventsCmHandleStateHandlerAsyncHelper(mockLcmEventsCreator, mockLcmEventsService) + def objectUnderTest = new LcmEventsCmHandleStateHandlerImpl(mockInventoryPersistence, lcmEventsCmHandleStateHandlerAsyncHelper) def cmHandleId = 'cmhandle-id-1' def compositeState |