This is an automated email from the ASF dual-hosted git repository.

sewen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit c84ebe839b3e1e936e68d2e67496cf7664b35287
Author: Stephan Ewen <se...@apache.org>
AuthorDate: Wed Aug 4 19:01:34 2021 +0200

    [FLINK-23630][tests] Make EventTimeWindowCheckpointingITCase run on Windows.
    
    This fixes the creation of Paths to be properly platform independent.
---
 .../checkpointing/EventTimeWindowCheckpointingITCase.java     | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git 
a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/EventTimeWindowCheckpointingITCase.java
 
b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/EventTimeWindowCheckpointingITCase.java
index eff22b8..1aff60d 100644
--- 
a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/EventTimeWindowCheckpointingITCase.java
+++ 
b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/EventTimeWindowCheckpointingITCase.java
@@ -175,8 +175,8 @@ public class EventTimeWindowCheckpointingITCase extends 
TestLogger {
                 break;
             case FILE:
                 {
-                    String backups = tempFolder.newFolder().getAbsolutePath();
-                    this.stateBackend = new FsStateBackend("file://" + 
backups);
+                    final File backups = 
tempFolder.newFolder().getAbsoluteFile();
+                    this.stateBackend = new 
FsStateBackend(Path.fromLocalFile(backups));
                     break;
                 }
             case ROCKSDB_FULL:
@@ -216,14 +216,13 @@ public class EventTimeWindowCheckpointingITCase extends 
TestLogger {
                 TaskManagerOptions.MANAGED_MEMORY_SIZE,
                 MemorySize.ofMebiBytes(PARALLELISM / NUM_OF_TASK_MANAGERS * 
64));
 
-        String rocksDb = tempFolder.newFolder().getAbsolutePath();
-        String backups = tempFolder.newFolder().getAbsolutePath();
+        final String rocksDb = tempFolder.newFolder().getAbsolutePath();
+        final File backups = tempFolder.newFolder().getAbsoluteFile();
         // we use the fs backend with small threshold here to test the 
behaviour with file
         // references, not self contained byte handles
         RocksDBStateBackend rdb =
                 new RocksDBStateBackend(
-                        new FsStateBackend(
-                                new Path("file://" + backups).toUri(), 
fileSizeThreshold),
+                        new 
FsStateBackend(Path.fromLocalFile(backups).toUri(), fileSizeThreshold),
                         incrementalCheckpoints);
         rdb.setDbStoragePath(rocksDb);
         this.stateBackend = rdb;

Reply via email to