aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-building-blocks/src/test/java/org
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/so-bpmn-building-blocks/src/test/java/org')
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java2
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java13
2 files changed, 12 insertions, 3 deletions
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java
index d1559c2ed1..11309914ef 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/TestApplication.java
@@ -20,7 +20,6 @@
package org.onap.so;
-import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication;
import org.onap.so.bpmn.common.DefaultToShortClassNameBeanNameGenerator;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -31,7 +30,6 @@ import org.springframework.context.annotation.Profile;
@SpringBootApplication
@Profile("test")
-@EnableProcessApplication("MSO CommonBPMN Test Application")
@ComponentScan(basePackages = {"org.onap.so"}, nameGenerator = DefaultToShortClassNameBeanNameGenerator.class, excludeFilters = {
@Filter(type = FilterType.ANNOTATION, classes = SpringBootApplication.class)})
public class TestApplication {
diff --git a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java
index 5162b83f4a..27bb328177 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java
+++ b/bpmn/so-bpmn-building-blocks/src/test/java/org/onap/so/bpmn/infrastructure/bpmn/subprocess/HomingBBTest.java
@@ -51,7 +51,18 @@ public class HomingBBTest extends BaseBPMNTest{
ProcessInstance pi = runtimeService.startProcessInstanceByKey("HomingBB", variables);
assertThat(pi).isNotNull();
assertThat(pi).isStarted()
- .hasPassedInOrder("start", "sniroOofCheck", "startBpmnError", "processMsoWorkflowException", "endBpmnError")
+ .hasPassed("start", "sniroOofCheck", "startBpmnError", "bpmnErrorSubprocess", "processMsoWorkflowException", "endBpmnError")
+ .hasNotPassed("callReceiveAsync");
+ assertThat(pi).isEnded();
+ }
+
+ @Test
+ public void testHomingV2_error_javaException(){
+ doThrow(new RuntimeException("Test")).when(sniroHoming).callSniro(any(BuildingBlockExecution.class));
+ ProcessInstance pi = runtimeService.startProcessInstanceByKey("HomingBB", variables);
+ assertThat(pi).isNotNull();
+ assertThat(pi).isStarted()
+ .hasPassed("start", "sniroOofCheck", "callSniro", "startJavaError", "processJavaException", "javaExceptionSubProcess", "endJavaError")
.hasNotPassed("callReceiveAsync");
assertThat(pi).isEnded();
}