From 9582973589fdb08f9e5869be13eadd171ed06598 Mon Sep 17 00:00:00 2001 From: Abhai Singh Date: Thu, 11 Jan 2018 16:56:57 +0530 Subject: Fix ToscaFileOutputServiceCsarImplTest Above mentioned test class has tests with shared state and can fail unexpectedly during parallel execution. Change-Id: I97772caaba60afca15f62166ba3b1c1d939bcc14 Issue-ID: SDC-904 Signed-off-by: Abhai Singh --- .../tosca/services/impl/ToscaFileOutputServiceCsarImplTest.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'openecomp-be/lib/openecomp-tosca-lib/src') diff --git a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImplTest.java b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImplTest.java index 66dda12b4b..0910684f3a 100644 --- a/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImplTest.java +++ b/openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImplTest.java @@ -41,11 +41,10 @@ import java.util.zip.ZipFile; public class ToscaFileOutputServiceCsarImplTest { - private final ToscaFileOutputServiceCsarImpl toscaFileOutputServiceCSARImpl = - new ToscaFileOutputServiceCsarImpl(); - @Test public void testCreationMetaFile() { + ToscaFileOutputServiceCsarImpl toscaFileOutputServiceCSARImpl = + new ToscaFileOutputServiceCsarImpl(); String createdMeta = toscaFileOutputServiceCSARImpl.createMetaFile("entryFile.yaml"); String expectedMeta = "TOSCA-Meta-File-Version: 1.0\n" + @@ -57,6 +56,8 @@ public class ToscaFileOutputServiceCsarImplTest { @Test public void testCSARFileCreationWithExternalArtifacts() throws IOException { + ToscaFileOutputServiceCsarImpl toscaFileOutputServiceCSARImpl = + new ToscaFileOutputServiceCsarImpl(); ServiceTemplate mainServiceTemplate = new ServiceTemplate(); Map metadata1 = new HashMap<>(); metadata1.put("Template_author", "OPENECOMP"); @@ -133,6 +134,8 @@ public class ToscaFileOutputServiceCsarImplTest { @Test public void testCSARFileCreation_noArtifacts() throws IOException { + ToscaFileOutputServiceCsarImpl toscaFileOutputServiceCSARImpl = + new ToscaFileOutputServiceCsarImpl(); ServiceTemplate serviceTemplate = new ServiceTemplate(); Map metadata = new HashMap<>(); metadata.put("Template_author", "OPENECOMP"); -- cgit 1.2.3-korg