You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Chesnay Schepler (JIRA)" <ji...@apache.org> on 2017/05/27 07:14:04 UTC

[jira] [Comment Edited] (FLINK-6670) remove CommonTestUtils.createTempDirectory()

    [ https://issues.apache.org/jira/browse/FLINK-6670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16027312#comment-16027312 ] 

Chesnay Schepler edited comment on FLINK-6670 at 5/27/17 7:13 AM:
------------------------------------------------------------------

We may want to extend this issue to cover {{CommonTestUtils#getTempDir()}} and {{CommonTestUtils#createTmpFile()}} in {{flink-test-utils}}.


was (Author: zentol):
We may want to extend this issue to cover {{CommonTestUtils#getTempDir()}} and {{ CommonTestUtils#createTmpFile()}} in {{flink-test-utils}}.

> remove CommonTestUtils.createTempDirectory()
> --------------------------------------------
>
>                 Key: FLINK-6670
>                 URL: https://issues.apache.org/jira/browse/FLINK-6670
>             Project: Flink
>          Issue Type: Bug
>          Components: Tests
>            Reporter: Nico Kruber
>            Assignee: Chesnay Schepler
>            Priority: Minor
>
> {{CommonTestUtils.createTempDirectory()}} encourages a dangerous design pattern with potential concurrency issues in the unit tests as well as the need to cleanup the created directories.
> Instead, it should be solved by using the following pattern:
> {code:java}
>         @Rule
>         public TemporaryFolder tempFolder = new TemporaryFolder();
> {code}
> We should therefore remove {{CommonTestUtils.createTempDirectory()}}.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)