diff options
author | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2018-11-17 00:52:11 -0500 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@us.att.com> | 2018-11-27 23:25:16 -0500 |
commit | 7ace3e6761629e84f357d4bea06fbf539039d218 (patch) | |
tree | bfa7bc279b309e6f81eeb938bd8b243449835656 /bpmn/mso-infrastructure-bpmn/src/test/java/org | |
parent | fbe2ea46cf3d8902bf2425f12e679523455beaa3 (diff) |
Use spring auto deployment
remove processes.xml from application in favor of spring properties
removed the last @EnableProcessApplication annotation
removed remaining processes.xml from code
modified JEL expression with explicit getVariable calls
update application.yaml defaults for camunda deployment
Update camunda configuration to run history clean up
Change-Id: If9a5cf03a8cdc33c32eeb790656f925d2f0b6d7b
Issue-ID: SO-1232
Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'bpmn/mso-infrastructure-bpmn/src/test/java/org')
3 files changed, 15 insertions, 23 deletions
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java index 201e791a24..70d94052e1 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/AaiConnectionTestImpl.java @@ -20,15 +20,19 @@ package org.onap.so.bpmn.infrastructure.pnf.delegate; -import org.onap.aai.domain.yang.Pnf; -import org.onap.so.bpmn.infrastructure.pnf.implementation.AaiConnection; - import java.io.IOException; import java.util.HashMap; import java.util.Map; import java.util.Objects; import java.util.Optional; +import org.onap.aai.domain.yang.Pnf; +import org.onap.so.bpmn.infrastructure.pnf.implementation.AaiConnection; +import org.springframework.context.annotation.Primary; +import org.springframework.stereotype.Component; + +@Component +@Primary public class AaiConnectionTestImpl implements AaiConnection { public static final String ID_WITHOUT_ENTRY = "IdWithoutEntry"; diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java index 6c174ae537..74e5a6c964 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/CreateAndActivatePnfResourceTest.java @@ -27,28 +27,14 @@ import java.util.HashMap; import java.util.Map; import org.assertj.core.api.Assertions; -import org.camunda.bpm.engine.RuntimeService; import org.camunda.bpm.engine.runtime.ProcessInstance; -import org.camunda.bpm.engine.test.Deployment; -import org.camunda.bpm.engine.test.ProcessEngineRule; -import org.junit.Rule; import org.junit.Test; -import org.junit.runner.RunWith; +import org.onap.so.BaseIntegrationTest; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringRunner; -@RunWith(SpringRunner.class) -@ContextConfiguration(locations = "/applicationContext_forPnfTesting.xml") -public class CreateAndActivatePnfResourceTest { +public class CreateAndActivatePnfResourceTest extends BaseIntegrationTest { private static final String TIMEOUT_10_S = "PT10S"; - @Autowired - private RuntimeService runtimeService; - - @Autowired - @Rule - public ProcessEngineRule processEngineRule; @Autowired private AaiConnectionTestImpl aaiConnection; @@ -57,7 +43,6 @@ public class CreateAndActivatePnfResourceTest { private DmaapClientTestImpl dmaapClientTestImpl; @Test - @Deployment(resources = {"process/CreateAndActivatePnfResource.bpmn"}) public void shouldWaitForMessageFromDmaapAndUpdateAaiEntryWhenAaiEntryExists() { // given aaiConnection.reset(); @@ -84,7 +69,6 @@ public class CreateAndActivatePnfResourceTest { } @Test - @Deployment(resources = {"process/CreateAndActivatePnfResource.bpmn"}) public void shouldCreateAaiEntryWaitForMessageFromDmaapAndUpdateAaiEntryWhenNoAaiEntryExists() { // given aaiConnection.reset(); diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java index 09fb2d4cd7..146e07b820 100644 --- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java +++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/DmaapClientTestImpl.java @@ -20,10 +20,14 @@ package org.onap.so.bpmn.infrastructure.pnf.delegate; -import org.onap.so.bpmn.infrastructure.pnf.dmaap.DmaapClient; - import java.util.Objects; +import org.onap.so.bpmn.infrastructure.pnf.dmaap.DmaapClient; +import org.springframework.context.annotation.Primary; +import org.springframework.stereotype.Component; + +@Component +@Primary public class DmaapClientTestImpl implements DmaapClient { private String correlationId; |