[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16311237#comment-16311237 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - rhtyd commented on issue #2384: CLOUDSTACK-10210 cleanup testfile URL: https://github.com/apache/cloudstack/pull/2384#issuecomment-355262768 Merging this based on code lgtms and Travis job1 (which run unit tests) test result. 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16311240#comment-16311240 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - rhtyd closed pull request #2384: CLOUDSTACK-10210 cleanup testfile URL: https://github.com/apache/cloudstack/pull/2384 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/services/secondary-storage/server/test/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResourceTest.java b/services/secondary-storage/server/test/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResourceTest.java index e437a0f3b64..44d762ff02d 100644 --- a/services/secondary-storage/server/test/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResourceTest.java +++ b/services/secondary-storage/server/test/org/apache/cloudstack/storage/resource/NfsSecondaryStorageResourceTest.java @@ -32,6 +32,7 @@ import org.powermock.modules.junit4.PowerMockRunner; import java.io.BufferedWriter; +import java.io.File; import java.io.FileWriter; import java.io.StringWriter; @@ -52,15 +53,21 @@ public void setUp() { @Test @PrepareForTest(NfsSecondaryStorageResource.class) public void testSwiftWriteMetadataFile() throws Exception { -String expected = "uniquename=test\nfilename=testfile\nsize=100\nvirtualsize=1000"; +String filename = "testfile"; +try { +String expected = "uniquename=test\nfilename=" + filename + "\nsize=100\nvirtualsize=1000"; -StringWriter stringWriter = new StringWriter(); -BufferedWriter bufferWriter = new BufferedWriter(stringWriter); - PowerMockito.whenNew(BufferedWriter.class).withArguments(any(FileWriter.class)).thenReturn(bufferWriter); +StringWriter stringWriter = new StringWriter(); +BufferedWriter bufferWriter = new BufferedWriter(stringWriter); + PowerMockito.whenNew(BufferedWriter.class).withArguments(any(FileWriter.class)).thenReturn(bufferWriter); -resource.swiftWriteMetadataFile("testfile", "test", "testfile", 100, 1000); +resource.swiftWriteMetadataFile(filename, "test", filename, 100, 1000); -Assert.assertEquals(expected, stringWriter.toString()); +Assert.assertEquals(expected, stringWriter.toString()); +} finally { +File remnance = new File(filename); +remnance.delete(); +} } @Test 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16311241#comment-16311241 ] ASF subversion and git services commented on CLOUDSTACK-10210: -- Commit dd21f68926f7fb65a65318618479e7f9e7874da2 in cloudstack's branch refs/heads/master from [~dahn] [ https://gitbox.apache.org/repos/asf?p=cloudstack.git;h=dd21f68 ] CLOUDSTACK-10210: cleanup testfile (#2384) Removes a test file created as part of the unit test. > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16311186#comment-16311186 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - rafaelweingartner commented on issue #2384: CLOUDSTACK-10210 cleanup testfile URL: https://github.com/apache/cloudstack/pull/2384#issuecomment-355256896 @DaanHoogland Thanks for the explanations! 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16311184#comment-16311184 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - DaanHoogland commented on issue #2384: CLOUDSTACK-10210 cleanup testfile URL: https://github.com/apache/cloudstack/pull/2384#issuecomment-355256479 @rafaelweingartner I have no idea and I want to be sure. Any I/O operation is suspect and probe to exceptions (not just the creation but also setting rights after creation) 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16311129#comment-16311129 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - rafaelweingartner commented on issue #2384: CLOUDSTACK-10210 cleanup testfile URL: https://github.com/apache/cloudstack/pull/2384#issuecomment-355248713 You are using a try/finally because you believe an exception might happen? If an exception happen in `swiftWriteMetadataFile` I believe the file will not get written, right? Or, is it possible for that method to throw an IOException while partially creating the file? 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16311126#comment-16311126 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - rafaelweingartner commented on issue #2384: CLOUDSTACK-10210 cleanup testfile URL: https://github.com/apache/cloudstack/pull/2384#issuecomment-355243616 @DaanHoogland first, if the other test is disabled, what about deleting it? Second, I also prefer as mark said, delete (delete, not deleteOnExit) the file right after the assertion. If someone is creating something in the FS in one test method and lazily using in otherwell, that is something we have to change. If the file is used in more methods and only created at that one, it will be deleted anyway, right? I have not checked the docs, but I have the impression the @Before, and @After are executed each and respectively before and after each test method. 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16311124#comment-16311124 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - DaanHoogland commented on issue #2384: CLOUDSTACK-10210 cleanup testfile URL: https://github.com/apache/cloudstack/pull/2384#issuecomment-355247602 @marcaurele @rafaelweingartner how about this one? 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16311106#comment-16311106 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - rafaelweingartner commented on issue #2384: CLOUDSTACK-10210 cleanup testfile URL: https://github.com/apache/cloudstack/pull/2384#issuecomment-355243616 @DaanHoogland first, if the other test is disabled, what about deleting it? Second, I also prefer as mark said, delete (delete, not deleteOnExit) the file right after the assertion. If someone is creating something in the FS in one test method and lazily using in otherwell, that is something we have to change. If the file is used in more methods and only created at that one, it will be deleted anyway, right? I have not checked the docs, but I have the impression the @Before, and @After I executed each and respectively before and after each test method. 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16311097#comment-16311097 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - DaanHoogland commented on issue #2384: CLOUDSTACK-10210 cleanup testfile URL: https://github.com/apache/cloudstack/pull/2384#issuecomment-355241310 @marcaurele valid point except that the other test is disabled and will never be run. Also my thinking was that the file might be used in more tests. I'll refactor anyway for you exists remark so i might as well add the finally construct. 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16311092#comment-16311092 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - marcaurele commented on issue #2384: CLOUDSTACK-10210 cleanup testfile URL: https://github.com/apache/cloudstack/pull/2384#issuecomment-355240138 @DaanHoogland semantically it's not the same for me as there is more than 1 test in the class. The `@after` will be run too if you only run the second test of that file. 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16311077#comment-16311077 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - DaanHoogland commented on issue #2384: CLOUDSTACK-10210 cleanup testfile URL: https://github.com/apache/cloudstack/pull/2384#issuecomment-355236560 @marcaurele I don't agree it would have to have a try-finaly construct to be sure the deletion happens, which is semantically the same as using the @After method. 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16311059#comment-16311059 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - marcaurele commented on issue #2384: CLOUDSTACK-10210 cleanup testfile URL: https://github.com/apache/cloudstack/pull/2384#issuecomment-355233875 From the API docs: > Deletion will be attempted only for normal termination of the virtual machine, as defined by the Java Language Specification. The safest bet IMO is to put the delete in the test method which creates the file, and to use `delete` instead of `deleteOnExit`. 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16311057#comment-16311057 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16311056#comment-16311056 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - DaanHoogland commented on issue #2384: CLOUDSTACK-10210 cleanup testfile URL: https://github.com/apache/cloudstack/pull/2384#issuecomment-355233097 @marcaurele I want to be absolutely sure that the registration for deletion is not skipped by an exception and I have never tried to to it before a creation. I wouldn't know if that actually works. A JVM (-library) might be so 'clever' as to ignore the registration altogether if it finds it doesn't exist. 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16311038#comment-16311038 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - DaanHoogland commented on a change in pull request #2384: CLOUDSTACK-10210 cleanup testfile URL: https://github.com/apache/cloudstack/pull/2384#discussion_r159604356 ## 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: sure, if that is needed. I didn't expect it to be an issue but we can test that ;) 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16310868#comment-16310868 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - marcaurele commented on issue #2384: CLOUDSTACK-10210 cleanup testfile URL: https://github.com/apache/cloudstack/pull/2384#issuecomment-355211882 typo in nickname ^^, cc @DaanHoogland 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16310854#comment-16310854 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - marcaurele commented on a change in pull request #2384: CLOUDSTACK-10210 cleanup testfile URL: https://github.com/apache/cloudstack/pull/2384#discussion_r159588962 ## 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: `exists()` check? 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16310799#comment-16310799 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - rhtyd commented on issue #2384: CLOUDSTACK-10210 cleanup testfile URL: https://github.com/apache/cloudstack/pull/2384#issuecomment-355205963 @rafaelweingartner do we have your +1/lgtm from ML applicable here? 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16310747#comment-16310747 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - rhtyd commented on issue #2384: CLOUDSTACK-10210 cleanup testfile URL: https://github.com/apache/cloudstack/pull/2384#issuecomment-355202554 Additional review requested, test LGTM. 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16309782#comment-16309782 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - rhtyd commented on issue #2384: CLOUDSTACK-10210 cleanup testfile URL: https://github.com/apache/cloudstack/pull/2384#issuecomment-355037209 The changes are restricted to only the unit test, Travis test results/confirmation should be enough for QA-ing the PR. 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (CLOUDSTACK-10210) remove test file
[ https://issues.apache.org/jira/browse/CLOUDSTACK-10210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16309778#comment-16309778 ] ASF GitHub Bot commented on CLOUDSTACK-10210: - DaanHoogland opened a new pull request #2384: CLOUDSTACK-10210 cleanup testfile URL: https://github.com/apache/cloudstack/pull/2384 cleaning up in the @After-method so it gets clean in case of exception as well 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: us...@infra.apache.org > remove test file > > > Key: CLOUDSTACK-10210 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10210 > Project: CloudStack > Issue Type: Improvement > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Secondary Storage >Reporter: Daan Hoogland >Assignee: Daan Hoogland >Priority: Trivial > > test leaves 'testfile' as remanence. remove in @after test finishes -- This message was sent by Atlassian JIRA (v6.4.14#64029)