Permalink
Browse files

[FLINK-5412] Enable RocksDB tests on Windows OS

This closes #3067.
  • Loading branch information...
1 parent 2ed899d commit e13ac598b48305080f19af32f475b95ab669dc3b @zentol zentol committed Jan 5, 2017
@@ -47,15 +47,12 @@
import org.apache.flink.streaming.runtime.tasks.OneInputStreamTaskTestHarness;
import org.apache.flink.streaming.runtime.tasks.StreamMockEnvironment;
import org.apache.flink.streaming.runtime.tasks.StreamTask;
-import org.apache.flink.util.OperatingSystem;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.LocalFileSystem;
import org.junit.Assert;
-import org.junit.Assume;
-import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -86,11 +83,6 @@
@SuppressWarnings("serial")
public class RocksDBAsyncSnapshotTest {
- @Before
- public void checkOperatingSystem() {
- Assume.assumeTrue("This test can't run successfully on Windows.", !OperatingSystem.isWindows());
- }
-
/**
* This ensures that asynchronous state handles are actually materialized asynchronously.
*
@@ -23,6 +23,7 @@
import org.apache.flink.api.common.TaskInfo;
import org.apache.flink.api.common.typeutils.base.IntSerializer;
import org.apache.flink.configuration.Configuration;
+import org.apache.flink.core.fs.Path;
import org.apache.flink.runtime.execution.Environment;
import org.apache.flink.runtime.io.disk.iomanager.IOManager;
import org.apache.flink.runtime.jobgraph.JobVertexID;
@@ -31,9 +32,6 @@
import org.apache.flink.runtime.state.KeyGroupRange;
import org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo;
import org.apache.flink.runtime.util.TestingTaskManagerRuntimeInfo;
-import org.apache.flink.util.OperatingSystem;
-import org.junit.Assume;
-import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -70,11 +68,6 @@
@Rule
public TemporaryFolder tempFolder = new TemporaryFolder();
- @Before
- public void checkOperatingSystem() {
- Assume.assumeTrue("This test can't run successfully on Windows.", !OperatingSystem.isWindows());
- }
-
// ------------------------------------------------------------------------
// RocksDB local file directory
// ------------------------------------------------------------------------
@@ -90,13 +83,13 @@ public void testSetDbPath() throws Exception {
assertNull(rocksDbBackend.getDbStoragePaths());
rocksDbBackend.setDbStoragePath(testDir1.getAbsolutePath());
- assertArrayEquals(new String[] { testDir1.getAbsolutePath() }, rocksDbBackend.getDbStoragePaths());
+ assertArrayEquals(new String[] { new Path(testDir1.getAbsolutePath()).toString() }, rocksDbBackend.getDbStoragePaths());
rocksDbBackend.setDbStoragePath(null);
assertNull(rocksDbBackend.getDbStoragePaths());
rocksDbBackend.setDbStoragePaths(testDir1.getAbsolutePath(), testDir2.getAbsolutePath());
- assertArrayEquals(new String[] { testDir1.getAbsolutePath(), testDir2.getAbsolutePath() }, rocksDbBackend.getDbStoragePaths());
+ assertArrayEquals(new String[] { new Path(testDir1.getAbsolutePath()).toString(), new Path(testDir2.getAbsolutePath()).toString() }, rocksDbBackend.getDbStoragePaths());
Environment env = getMockEnvironment();
RocksDBKeyedStateBackend<Integer> keyedBackend = (RocksDBKeyedStateBackend<Integer>) rocksDbBackend.
@@ -34,9 +34,6 @@
import org.apache.flink.runtime.state.VoidNamespaceSerializer;
import org.apache.flink.runtime.state.filesystem.FsStateBackend;
import org.apache.flink.runtime.state.memory.MemCheckpointStreamFactory;
-import org.apache.flink.util.OperatingSystem;
-import org.junit.Assume;
-import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -82,11 +79,6 @@
@Rule
public TemporaryFolder tempFolder = new TemporaryFolder();
- @Before
- public void checkOS() throws Exception {
- Assume.assumeTrue("This test can't run successfully on Windows.", !OperatingSystem.isWindows());
- }
-
@Override
protected RocksDBStateBackend getStateBackend() throws IOException {
String dbPath = tempFolder.newFolder().getAbsolutePath();

0 comments on commit e13ac59

Please sign in to comment.