You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2017/05/10 07:06:33 UTC
[5/7] flink git commit: [FLINK-6396] Fix FsSavepointStreamFactoryTest
on Windows
[FLINK-6396] Fix FsSavepointStreamFactoryTest on Windows
This closes #3789.
Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/236b373e
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/236b373e
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/236b373e
Branch: refs/heads/master
Commit: 236b373e3d314f3a01e89ae596a0cf1a8fd2ad55
Parents: c102547
Author: zentol <ch...@apache.org>
Authored: Thu Apr 27 15:56:48 2017 +0200
Committer: zentol <ch...@apache.org>
Committed: Tue May 9 22:56:49 2017 +0200
----------------------------------------------------------------------
.../state/filesystem/FsSavepointStreamFactoryTest.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flink/blob/236b373e/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());
}
}