Skip to content

Commit

Permalink
[FLINK-6396] Fix FsSavepointStreamFactoryTest on Windows
Browse files Browse the repository at this point in the history
This closes apache#3789.
  • Loading branch information
zentol committed May 9, 2017
1 parent c102547 commit 236b373
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

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;
Expand All @@ -48,7 +49,8 @@ public void testSavepointStreamDirectoryLayout() throws Exception {
jobId,
0);

File[] listed = testRoot.listFiles();
Path root = new Path(testRoot.getAbsolutePath());
FileStatus[] listed = root.getFileSystem().listStatus(root);
assertNotNull(listed);
assertEquals(0, listed.length);

Expand All @@ -59,9 +61,9 @@ public void testSavepointStreamDirectoryLayout() throws Exception {

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());
}
}

0 comments on commit 236b373

Please sign in to comment.