aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-infrastructure-flows
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/so-bpmn-infrastructure-flows')
-rw-r--r--bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java30
1 files changed, 18 insertions, 12 deletions
diff --git a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java
index b0517ace3d..f51ea006d2 100644
--- a/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java
+++ b/bpmn/so-bpmn-infrastructure-flows/src/test/java/org/onap/so/bpmn/infrastructure/process/CreateVcpeResCustServiceSimplifiedTest.java
@@ -36,6 +36,7 @@ import java.util.UUID;
import org.camunda.bpm.engine.runtime.Execution;
import org.camunda.bpm.engine.runtime.ProcessInstance;
import org.junit.Before;
+import org.junit.Ignore;
import org.junit.Test;
import org.onap.ccsdk.cds.controllerblueprints.common.api.ActionIdentifiers;
import org.onap.ccsdk.cds.controllerblueprints.common.api.CommonHeader;
@@ -51,8 +52,10 @@ import org.springframework.beans.factory.annotation.Autowired;
/**
* Basic Integration test for createVcpeResCustService_Simplified.bpmn workflow.
*/
+@Ignore
public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest {
+ private static final long WORKFLOW_WAIT_TIME = 1000L;
private Logger logger = LoggerFactory.getLogger(getClass());
private static final String TEST_PROCESSINSTANCE_KEY = "CreateVcpeResCustService_simplified";
@@ -101,7 +104,7 @@ public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest {
}
@Test
- public void workflow_validInput_expectedOuput() {
+ public void workflow_validInput_expectedOuput() throws InterruptedException {
mockCatalogDb();
mockRequestDb();
@@ -112,26 +115,25 @@ public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest {
runtimeService.startProcessInstanceByKey(TEST_PROCESSINSTANCE_KEY, testBusinessKey, variables);
assertThat(pi).isNotNull();
- Execution execution = runtimeService.createExecutionQuery().processDefinitionKey("CreateAndActivatePnfResource")
- .activityId("WaitForDmaapPnfReadyNotification").singleResult();
+ Thread.sleep(WORKFLOW_WAIT_TIME);
- if (!execution.isSuspended() && !execution.isEnded()) {
- try {
+ Execution execution = runtimeService.createExecutionQuery().processInstanceBusinessKey(testBusinessKey)
+ .messageEventSubscriptionName("WorkflowMessage").singleResult();
- runtimeService.signal(execution.getId());
- } catch (Exception e) {
- logger.info(e.getMessage(), e);
- }
+ assertThat(execution).isNotNull();
+
+ int waitCount = 10;
+ while (!pi.isEnded() && waitCount >= 0) {
+ Thread.sleep(WORKFLOW_WAIT_TIME);
+ waitCount--;
}
- assertThat(pi).isStarted().hasPassedInOrder("createVCPE_startEvent", "preProcessRequest_ScriptTask",
+ assertThat(pi).isEnded().hasPassedInOrder("createVCPE_startEvent", "preProcessRequest_ScriptTask",
"sendSyncAckResponse_ScriptTask", "ScriptTask_0cdtchu", "DecomposeService", "ScriptTask_0lpv2da",
"ScriptTask_1y241p8", "CallActivity_1vc4jeh", "ScriptTask_1y5lvl7", "GeneratePnfUuid", "Task_14l19kv",
"Pnf_Con", "setPONR_ScriptTask", "postProcessAndCompletionRequest_ScriptTask",
"callCompleteMsoProcess_CallActivity", "ScriptTask_2", "CreateVCPE_EndEvent");
- assertThat(pi).isEnded();
-
List<ExecutionServiceInput> detailedMessages = grpcNettyServer.getDetailedMessages();
assertThat(detailedMessages).hasSize(2);
try {
@@ -144,6 +146,8 @@ public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest {
}
private void checkConfigAssign(ExecutionServiceInput executionServiceInput) {
+
+ logger.info("Checking the configAssign request");
ActionIdentifiers actionIdentifiers = executionServiceInput.getActionIdentifiers();
/**
@@ -173,6 +177,8 @@ public class CreateVcpeResCustServiceSimplifiedTest extends BaseBPMNTest {
}
private void checkConfigDeploy(ExecutionServiceInput executionServiceInput) {
+
+ logger.info("Checking the configDeploy request");
ActionIdentifiers actionIdentifiers = executionServiceInput.getActionIdentifiers();
/**