aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-building-blocks/src/test
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2018-11-17 00:52:11 -0500
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2018-11-27 23:25:16 -0500
commit7ace3e6761629e84f357d4bea06fbf539039d218 (patch)
treebfa7bc279b309e6f81eeb938bd8b243449835656 /bpmn/so-bpmn-building-blocks/src/test
parentfbe2ea46cf3d8902bf2425f12e679523455beaa3 (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/so-bpmn-building-blocks/src/test')
-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
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/resources/META-INF/processes.xml0
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml6
-rw-r--r--bpmn/so-bpmn-building-blocks/src/test/resources/logback-test.xml2
5 files changed, 19 insertions, 4 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();
}
diff --git a/bpmn/so-bpmn-building-blocks/src/test/resources/META-INF/processes.xml b/bpmn/so-bpmn-building-blocks/src/test/resources/META-INF/processes.xml
deleted file mode 100644
index e69de29bb2..0000000000
--- a/bpmn/so-bpmn-building-blocks/src/test/resources/META-INF/processes.xml
+++ /dev/null
diff --git a/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml b/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml
index 62e2c0a8c2..1090ab7be4 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml
+++ b/bpmn/so-bpmn-building-blocks/src/test/resources/application-test.yaml
@@ -200,6 +200,12 @@ camunda:
metrics:
enabled: false
db-reporter-activate: false
+ application:
+ delete-upon-undeploy: false
+ scan-for-process-definitions: true
+ deploy-changed-only: true
+ job-execution:
+ deployment-aware: true
pnf:
dmaap:
host: hostTest
diff --git a/bpmn/so-bpmn-building-blocks/src/test/resources/logback-test.xml b/bpmn/so-bpmn-building-blocks/src/test/resources/logback-test.xml
index d8f6ba3930..64b6bfc81b 100644
--- a/bpmn/so-bpmn-building-blocks/src/test/resources/logback-test.xml
+++ b/bpmn/so-bpmn-building-blocks/src/test/resources/logback-test.xml
@@ -26,5 +26,5 @@
</root>
<logger name="wiremock.org" level="DEBUG" />
-
+<logger name="org.camunda" level="DEBUG" />
</configuration> \ No newline at end of file