flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ches...@apache.org
Subject [4/4] flink git commit: [FLINK-6396] Fix FsSavepointStreamFactoryTest on Windows
Date Tue, 09 May 2017 20:56:24 GMT
[FLINK-6396] Fix FsSavepointStreamFactoryTest on Windows


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/35b74f2b
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/35b74f2b
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/35b74f2b

Branch: refs/heads/release-1.3
Commit: 35b74f2bc2247fe00f894167ce49ab063f2a7e8b
Parents: 2e044d4
Author: zentol <chesnay@apache.org>
Authored: Thu Apr 27 15:56:48 2017 +0200
Committer: zentol <chesnay@apache.org>
Committed: Tue May 9 21:07:33 2017 +0200

----------------------------------------------------------------------
 .../state/filesystem/FsSavepointStreamFactoryTest.java       | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/35b74f2b/flink-runtime/src/test/java/org/apache/flink/runtime/state/filesystem/FsSavepointStreamFactoryTest.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/state/filesystem/FsSavepointStreamFactoryTest.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/state/filesystem/FsSavepointStreamFactoryTest.java
index a29d29c..3095a09 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/state/filesystem/FsSavepointStreamFactoryTest.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/state/filesystem/FsSavepointStreamFactoryTest.java
@@ -23,6 +23,7 @@ import static org.junit.Assert.assertNotNull;
 
 import java.io.File;
 import org.apache.flink.api.common.JobID;
+import org.apache.flink.core.fs.FileStatus;
 import org.apache.flink.core.fs.Path;
 import org.apache.flink.runtime.state.filesystem.FsCheckpointStreamFactory.FsCheckpointStateOutputStream;
 import org.junit.Rule;
@@ -48,7 +49,8 @@ public class FsSavepointStreamFactoryTest {
 				jobId,
 				0);
 
-		File[] listed = testRoot.listFiles();
+		Path root = new Path(testRoot.getAbsolutePath());
+		FileStatus[] listed = root.getFileSystem().listStatus(root);
 		assertNotNull(listed);
 		assertEquals(0, listed.length);
 
@@ -59,9 +61,9 @@ public class FsSavepointStreamFactoryTest {
 
 		FileStateHandle handle = (FileStateHandle) stream.closeAndGetHandle();
 
-		listed = testRoot.listFiles();
+		listed = root.getFileSystem().listStatus(root);
 		assertNotNull(listed);
 		assertEquals(1, listed.length);
-		assertEquals(handle.getFilePath().getPath(), listed[0].getPath());
+		assertEquals(handle.getFilePath().getPath(), listed[0].getPath().getPath());
 	}
 }


Mime
View raw message