Merge "removal of the non committers"
authorByung-Woo Jun <byung-woo.jun@ericsson.com>
Thu, 19 Jul 2018 07:41:36 +0000 (07:41 +0000)
committerGerrit Code Review <gerrit@onap.org>
Thu, 19 Jul 2018 07:41:36 +0000 (07:41 +0000)
bpmn/MSOCoreBPMN/src/main/java/org/openecomp/mso/bpmn/core/PropertyConfiguration.java
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/PropertyConfigurationTest.java
bpmn/MSOCoreBPMN/src/test/java/org/openecomp/mso/bpmn/core/TestBaseTask.java
bpmn/pom.xml

index b627205..f75722e 100644 (file)
@@ -115,6 +115,10 @@ public class PropertyConfiguration {
                return PropertyConfigurationInstanceHolder.instance;
        }
 
+       static void resetPropertyConfigurationSingletonInstance(){
+               PropertyConfigurationInstanceHolder.instance = new PropertyConfiguration();
+       }
+
        /**
         * Returns the list of supported files.
         */
index 506dba2..57a5128 100644 (file)
@@ -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);
index d434ac7..1346fde 100644 (file)
@@ -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();
index 2989a18..d7e26f9 100644 (file)
         <artifactId>maven-surefire-plugin</artifactId>
         <version>2.19.1</version>
         <configuration>
+          <redirectTestOutputToFile>true</redirectTestOutputToFile>
           <testFailureIgnore>false</testFailureIgnore>
           <argLine>${surefireArgLine} -Xss1m</argLine>
           <forkCount>1</forkCount>