From: Bogumil Zebek Date: Thu, 24 May 2018 08:57:54 +0000 (+0200) Subject: Fix problem with singleton and parallel unit tests X-Git-Tag: v1.3.0~54^2 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F69%2F48869%2F1;p=so.git Fix problem with singleton and parallel unit tests Change-Id: If4236506978795933564fc6507e780212edbfd5d Issue-ID: SO-641 Signed-off-by: Bogumil Zebek --- 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 defaultProperties = PropertyConfigurationSetup.createBpmnProperties(); defaultProperties.put("testValue", "testKey"); PropertyConfigurationSetup.init(defaultProperties);