summaryrefslogtreecommitdiffstats
path: root/bpmn/MSOCoreBPMN
diff options
context:
space:
mode:
Diffstat (limited to 'bpmn/MSOCoreBPMN')
-rw-r--r--bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java4
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/PropertyConfigurationTest.java2
-rw-r--r--bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java9
3 files changed, 14 insertions, 1 deletions
diff --git a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java
index b6272057a5..f75722ecc5 100644
--- a/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java
+++ b/bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java
@@ -115,6 +115,10 @@ public class PropertyConfiguration {
return PropertyConfigurationInstanceHolder.instance;
}
+ static void resetPropertyConfigurationSingletonInstance(){
+ PropertyConfigurationInstanceHolder.instance = new PropertyConfiguration();
+ }
+
/**
* Returns the list of supported files.
*/
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/PropertyConfigurationTest.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/PropertyConfigurationTest.java
index 506dba2552..57a512891f 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/PropertyConfigurationTest.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/PropertyConfigurationTest.java
@@ -51,6 +51,8 @@ import org.junit.Test;
public class PropertyConfigurationTest {
@Before
public void beforeTest() throws IOException {
+ PropertyConfiguration.resetPropertyConfigurationSingletonInstance();
+
Map<String, String> defaultProperties = PropertyConfigurationSetup.createBpmnProperties();
defaultProperties.put("testValue", "testKey");
PropertyConfigurationSetup.init(defaultProperties);
diff --git a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java
index d434ac702d..1346fde674 100644
--- a/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java
+++ b/bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java
@@ -32,6 +32,7 @@ import org.camunda.bpm.engine.test.Deployment;
import org.camunda.bpm.engine.test.ProcessEngineRule;
import org.junit.Assert;
import org.junit.Before;
+import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
@@ -45,7 +46,13 @@ public class TestBaseTask {
@Rule
public ProcessEngineRule processEngineRule = new ProcessEngineRule();
-
+
+ @BeforeClass
+ public static void setUpClass() {
+ System.setProperty("mso.config.path", "src/test/resources");
+ PropertyConfiguration.resetPropertyConfigurationSingletonInstance();
+ }
+
@Before
public void beforeTest() throws Exception {
CamundaDBSetup.configure();