flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zentol <...@git.apache.org>
Subject [GitHub] flink pull request #6399: [FLINK-5860] [tests] Replace java.io.tmpdir with J...
Date Tue, 24 Jul 2018 11:49:42 GMT
Github user zentol commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6399#discussion_r204720758
  
    --- Diff: flink-runtime/src/test/java/org/apache/flink/runtime/operators/DataSinkTaskTest.java
---
    @@ -49,22 +50,17 @@
     import static org.junit.Assert.assertTrue;
     
     public class DataSinkTaskTest extends TaskTestBase {
    +
    +	@Rule
    +	public TemporaryFolder tempFolder = new TemporaryFolder();
     	
     	private static final Logger LOG = LoggerFactory.getLogger(DataSinkTaskTest.class);
     
     	private static final int MEMORY_MANAGER_SIZE = 3 * 1024 * 1024;
     
     	private static final int NETWORK_BUFFER_SIZE = 1024;
     
    -	private final String tempTestPath = constructTestPath(DataSinkTaskTest.class, "dst_test");
    -
    -	@After
    -	public void cleanUp() {
    -		File tempTestFile = new File(this.tempTestPath);
    -		if(tempTestFile.exists()) {
    -			tempTestFile.delete();
    -		}
    -	}
    +	private final String tempTestFileName = getClass().getName() + "-dst_test";
    --- End diff --
    
    since this was only used to prevent name clashes between tests it should now be redundant
and can be removed.


---

Mime
View raw message