Chesnay Schepler created FLINK-9125: ---------------------------------------
Summary: MiniClusterResource should set CoreOptions.TMP_DIRS Key: FLINK-9125 URL: https://issues.apache.org/jira/browse/FLINK-9125 Project: Flink Issue Type: Improvement Components: Tests Affects Versions: 1.5.0 Reporter: Chesnay Schepler We've frequently seen test stability issues when creating temporary file that use hard-coded paths, like {{/tmp}}, and generally tried to instead use {{TemporaryFolders}} instead. The {{CoreOptions.TMP_DIRS}} option is used by some components to determine where temporary files should be placed. By default this points to {{System.getProperty("java.io.tmpdir")}}, which usually points to {{/tmp}}. This property is rarely set explicitly by tests, which leads to failures such as this: https://travis-ci.org/apache/flink/jobs/361515791 {code} org.apache.flink.test.api.java.operators.lambdas.JoinITCase Time elapsed: 3.025 sec <<< ERROR! java.io.IOException: Could not create root directory for local recovery: /tmp/localState at org.apache.flink.runtime.state.TaskExecutorLocalStateStoresManager.<init>(TaskExecutorLocalStateStoresManager.java:89) at org.apache.flink.runtime.taskexecutor.TaskManagerServices.fromConfiguration(TaskManagerServices.java:284) at org.apache.flink.runtime.taskexecutor.TaskManagerRunner.startTaskManager(TaskManagerRunner.java:303) at org.apache.flink.runtime.minicluster.MiniCluster.startTaskManagers(MiniCluster.java:738) at org.apache.flink.runtime.minicluster.MiniCluster.start(MiniCluster.java:306) at org.apache.flink.test.util.MiniClusterResource.startMiniCluster(MiniClusterResource.java:217) at org.apache.flink.test.util.MiniClusterResource.startJobExecutorService(MiniClusterResource.java:171) at org.apache.flink.test.util.MiniClusterResource.before(MiniClusterResource.java:121) at org.junit.rules.ExternalResource$1.evaluate(ExternalResource.java:46) at org.junit.rules.RunRules.evaluate(RunRules.java:20) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:283) at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:173) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:128) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:203) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:155) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) {code} It would be nice if the MiniClusterResource inherently contains a {{TemporaryFolder}} which is used to configure {{CoreOptions.TMP_DIRS}} as well as other tmp dir options. -- This message was sent by Atlassian JIRA (v7.6.3#76005)