marcaurele commented on a change in pull request #2384: CLOUDSTACK-10210 
cleanup testfile
URL: https://github.com/apache/cloudstack/pull/2384#discussion_r159606283
 
 

 ##########
 File path: 
services/secondary-storage/server/test/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResourceTest.java
 ##########
 @@ -49,16 +51,22 @@ public void setUp() {
         resource = new NfsSecondaryStorageResource();
     }
 
+    String filename = "testfile";
+    @After
+    public void cleanup() {
+        File remnance = new File(filename);
+        remnance.deleteOnExit();
 
 Review comment:
   In case someone run in an IDE only 1 of the class tests, it will cause an 
error. It's best to do the cleanup inside the test method where the file is 
created.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to