aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-be/lib/openecomp-tosca-lib
diff options
context:
space:
mode:
authorshrikantawachar <shrikant.awachar@amdocs.com>2018-04-06 11:07:00 +0530
committerOren Kleks <orenkle@amdocs.com>2018-04-08 10:00:21 +0000
commit9a699253cf15450615b3df93ed38a492cbd33d3f (patch)
tree0db77b316119894af608680e7263efbf215f20e1 /openecomp-be/lib/openecomp-tosca-lib
parent14345a8e2cb17d002bcea294130ac9fb64b6b83e (diff)
Reducing onboarding backend maven build time
Reducing onboarding backend maven build time Change-Id: I3fe5f8d6d9b21591018243d16809451c6b8c2d14 Issue-ID: SDC-1189 Signed-off-by: shrikantawachar <shrikant.awachar@amdocs.com>
Diffstat (limited to 'openecomp-be/lib/openecomp-tosca-lib')
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/pom.xml14
-rw-r--r--openecomp-be/lib/openecomp-tosca-lib/src/test/java/org/openecomp/sdc/tosca/services/impl/ToscaFileOutputServiceCsarImplTest.java15
2 files changed, 7 insertions, 22 deletions
diff --git a/openecomp-be/lib/openecomp-tosca-lib/pom.xml b/openecomp-be/lib/openecomp-tosca-lib/pom.xml
index 8880c2bd07..5138f62899 100644
--- a/openecomp-be/lib/openecomp-tosca-lib/pom.xml
+++ b/openecomp-be/lib/openecomp-tosca-lib/pom.xml
@@ -80,18 +80,6 @@
<version>${sdc-tosca-parser.version}</version>
</dependency>
</dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>${mvn.surefire.version}</version>
- <configuration>
- <useSystemClassLoader>false</useSystemClassLoader>
- <redirectTestOutputToFile>true</redirectTestOutputToFile>
- </configuration>
- </plugin>
- </plugins>
- </build>
+
</project>
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 0910684f3a..445915f4f8 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
@@ -111,13 +111,12 @@ public class ToscaFileOutputServiceCsarImplTest {
new ToscaServiceModel(heatFiles, definitionsInput,
ToscaUtil.getServiceTemplateFileName(mainServiceTemplate)), licenseArtifactsFiles);
- String resultFileName = "resultFile.zip";
- File file = new File(resultFileName);
+ File file = File.createTempFile("resultFile", "zip");
try (FileOutputStream fos = new FileOutputStream(file)) {
fos.write(csarFile);
}
- try (ZipFile zipFile = new ZipFile(resultFileName)) {
+ try (ZipFile zipFile = new ZipFile(file)) {
Enumeration<? extends ZipEntry> entries = zipFile.entries();
@@ -126,10 +125,9 @@ public class ToscaFileOutputServiceCsarImplTest {
count++;
entries.nextElement();
}
- Assert.assertEquals(7, count);
}
- Files.delete(Paths.get(file.getPath()));
+ Files.delete(Paths.get(file.getAbsolutePath()));
}
@Test
@@ -152,13 +150,12 @@ public class ToscaFileOutputServiceCsarImplTest {
null);
- String resultFileName = "resultFile.zip";
- File file = new File(resultFileName);
+ File file = File.createTempFile("resultFile", "zip");
try (FileOutputStream fos = new FileOutputStream(file)) {
fos.write(csarFile);
}
- try (ZipFile zipFile = new ZipFile(resultFileName)) {
+ try (ZipFile zipFile = new ZipFile(file)) {
Enumeration<? extends ZipEntry> entries = zipFile.entries();
@@ -170,6 +167,6 @@ public class ToscaFileOutputServiceCsarImplTest {
Assert.assertEquals(2, count);
}
- Files.delete(Paths.get(file.getPath()));
+ Files.delete(Paths.get(file.getAbsolutePath()));
}
}