summaryrefslogtreecommitdiffstats
path: root/bpmn/mso-infrastructure-bpmn
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/mso-infrastructure-bpmn')
-rw-r--r--bpmn/mso-infrastructure-bpmn/pom.xml5
-rw-r--r--bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/bpmn/CreateAndActivatePnfResourceTest.java16
2 files changed, 13 insertions, 8 deletions
diff --git a/bpmn/mso-infrastructure-bpmn/pom.xml b/bpmn/mso-infrastructure-bpmn/pom.xml
index e44156daa9..151ba2c3aa 100644
--- a/bpmn/mso-infrastructure-bpmn/pom.xml
+++ b/bpmn/mso-infrastructure-bpmn/pom.xml
@@ -196,5 +196,10 @@
<artifactId>micrometer-registry-prometheus</artifactId>
<version>1.0.5</version>
</dependency>
+ <dependency>
+ <groupId>org.onap.so</groupId>
+ <artifactId>so-bpmn-tasks</artifactId>
+ <version>${project.version}</version>
+ </dependency>
</dependencies>
</project>
diff --git a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/bpmn/CreateAndActivatePnfResourceTest.java b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/bpmn/CreateAndActivatePnfResourceTest.java
index d42717f5c1..b514c38d47 100644
--- a/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/bpmn/CreateAndActivatePnfResourceTest.java
+++ b/bpmn/mso-infrastructure-bpmn/src/test/java/org/onap/so/bpmn/infrastructure/pnf/delegate/bpmn/CreateAndActivatePnfResourceTest.java
@@ -30,18 +30,17 @@ import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableName
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.history.HistoricVariableInstance;
import org.camunda.bpm.engine.runtime.ProcessInstance;
import org.camunda.bpm.engine.test.Deployment;
import org.camunda.bpm.engine.test.ProcessEngineRule;
import org.camunda.bpm.engine.test.assertions.bpmn.BpmnAwareTests;
-import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.onap.so.bpmn.infrastructure.pnf.delegate.AaiConnectionTestImpl;
+import org.onap.so.bpmn.infrastructure.pnf.delegate.DmaapClientTestImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringRunner;
@@ -61,6 +60,9 @@ public class CreateAndActivatePnfResourceTest {
@Autowired
private AaiConnectionTestImpl aaiConnection;
+ @Autowired
+ private DmaapClientTestImpl dmaapClientTestImpl;
+
@Test
@Deployment(resources = {"process/CreateAndActivatePnfResource.bpmn"})
public void shouldSaveCurrentIpToVariableIfItAlreadyExistsInAai() throws Exception {
@@ -96,9 +98,8 @@ public class CreateAndActivatePnfResourceTest {
ProcessInstance instance = runtimeService
.startProcessInstanceByKey("CreateAndActivatePnfResource", "businessKey", variables);
assertThat(instance).isWaitingAt("WaitForDmaapPnfReadyNotification").isWaitingFor("WorkflowMessage");
- runtimeService.createMessageCorrelation("WorkflowMessage")
- .processInstanceBusinessKey("businessKey")
- .correlateWithResult();
+ dmaapClientTestImpl.sendMessage();
+
// then
assertThat(instance).isEnded().hasPassedInOrder(
"CreateAndActivatePnf_StartEvent",
@@ -125,9 +126,8 @@ public class CreateAndActivatePnfResourceTest {
ProcessInstance instance = runtimeService
.startProcessInstanceByKey("CreateAndActivatePnfResource", "businessKey", variables);
assertThat(instance).isWaitingAt("WaitForDmaapPnfReadyNotification").isWaitingFor("WorkflowMessage");
- runtimeService.createMessageCorrelation("WorkflowMessage")
- .processInstanceBusinessKey("businessKey")
- .correlateWithResult();
+ dmaapClientTestImpl.sendMessage();
+
// then
assertThat(instance).isEnded().hasPassedInOrder(
"CreateAndActivatePnf_StartEvent",