diff --git a/src/test/java/org/gcube/phd/Statistics.java b/src/test/java/org/gcube/phd/Statistics.java index 4d2136d..213510c 100644 --- a/src/test/java/org/gcube/phd/Statistics.java +++ b/src/test/java/org/gcube/phd/Statistics.java @@ -64,6 +64,9 @@ public class Statistics extends ScopedTest { } String unmarshalledGR = getUnmarshalledResource(gr); File xmlFile = new File(directory, uuid.toString()+".xml"); + if(xmlFile.exists()) { + xmlFile.delete(); + } printLineToFile(unmarshalledGR, xmlFile); final byte[] grUTF8Bytes = unmarshalledGR.getBytes("UTF-8"); @@ -71,6 +74,9 @@ public class Statistics extends ScopedTest { stringBuffer.append(","); String unmarshalledR = ISMapper.marshal(r); File jsonFile = new File(directory, uuid.toString()+".json"); + if(jsonFile.exists()) { + jsonFile.delete(); + } printLineToFile(unmarshalledR, jsonFile); final byte[] rUTF8Bytes = unmarshalledR.getBytes("UTF-8"); @@ -88,7 +94,13 @@ public class Statistics extends ScopedTest { directory = new File("/home/lucafrosini/Dropbox/Dottorato/Review Tesi"); File eServicesFile = new File(directory, "EService.csv"); + if(eServicesFile.exists()) { + eServicesFile.delete(); + } File hostingNodeFile = new File(directory, "HostingNode.csv"); + if(hostingNodeFile.exists()) { + hostingNodeFile.delete(); + } List serviceIDs = new ArrayList<>(); // Data Tansfer Service