diff --git a/flink-connectors/flink-hadoop-compatibility/src/test/java/org/apache/flink/test/hadoopcompatibility/mapred/HadoopMapredITCase.java b/flink-connectors/flink-hadoop-compatibility/src/test/java/org/apache/flink/test/hadoopcompatibility/mapred/HadoopMapredITCase.java index ccc0d82017b8d..0b5a366c37cad 100644 --- a/flink-connectors/flink-hadoop-compatibility/src/test/java/org/apache/flink/test/hadoopcompatibility/mapred/HadoopMapredITCase.java +++ b/flink-connectors/flink-hadoop-compatibility/src/test/java/org/apache/flink/test/hadoopcompatibility/mapred/HadoopMapredITCase.java @@ -21,12 +21,21 @@ import org.apache.flink.test.hadoopcompatibility.mapred.example.HadoopMapredCompatWordCount; import org.apache.flink.test.testdata.WordCountData; import org.apache.flink.test.util.JavaProgramTestBase; +import org.apache.flink.util.OperatingSystem; +import org.junit.Assume; +import org.junit.Before; public class HadoopMapredITCase extends JavaProgramTestBase { protected String textPath; protected String resultPath; + @Before + public void checkOperatingSystem() { + // FLINK-5164 - see https://wiki.apache.org/hadoop/WindowsProblems + Assume.assumeTrue("This test can't run successfully on Windows.", !OperatingSystem.isWindows()); + } + @Override protected void preSubmit() throws Exception { textPath = createTempFile("text.txt", WordCountData.TEXT); diff --git a/flink-connectors/flink-hadoop-compatibility/src/test/java/org/apache/flink/test/hadoopcompatibility/mapreduce/HadoopInputOutputITCase.java b/flink-connectors/flink-hadoop-compatibility/src/test/java/org/apache/flink/test/hadoopcompatibility/mapreduce/HadoopInputOutputITCase.java index 698e356e9262c..48aa258ddead6 100644 --- a/flink-connectors/flink-hadoop-compatibility/src/test/java/org/apache/flink/test/hadoopcompatibility/mapreduce/HadoopInputOutputITCase.java +++ b/flink-connectors/flink-hadoop-compatibility/src/test/java/org/apache/flink/test/hadoopcompatibility/mapreduce/HadoopInputOutputITCase.java @@ -21,12 +21,20 @@ import org.apache.flink.test.hadoopcompatibility.mapreduce.example.WordCount; import org.apache.flink.test.testdata.WordCountData; import org.apache.flink.test.util.JavaProgramTestBase; +import org.apache.flink.util.OperatingSystem; +import org.junit.Assume; +import org.junit.Before; public class HadoopInputOutputITCase extends JavaProgramTestBase { protected String textPath; protected String resultPath; + @Before + public void checkOperatingSystem() { + // FLINK-5164 - see https://wiki.apache.org/hadoop/WindowsProblems + Assume.assumeTrue("This test can't run successfully on Windows.", !OperatingSystem.isWindows()); + } @Override protected void preSubmit() throws Exception { diff --git a/flink-tests/src/test/java/org/apache/flink/test/hadoop/mapred/HadoopIOFormatsITCase.java b/flink-tests/src/test/java/org/apache/flink/test/hadoop/mapred/HadoopIOFormatsITCase.java index 0cb1ac5f1e189..468b78077457f 100644 --- a/flink-tests/src/test/java/org/apache/flink/test/hadoop/mapred/HadoopIOFormatsITCase.java +++ b/flink-tests/src/test/java/org/apache/flink/test/hadoop/mapred/HadoopIOFormatsITCase.java @@ -26,6 +26,7 @@ import org.apache.flink.api.java.hadoop.mapred.HadoopInputFormat; import org.apache.flink.test.util.JavaProgramTestBase; import org.apache.flink.test.util.TestBaseUtils; +import org.apache.flink.util.OperatingSystem; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.IOUtils; @@ -35,6 +36,8 @@ import org.apache.hadoop.io.Text; import org.apache.hadoop.mapred.JobConf; import org.apache.hadoop.mapred.SequenceFileInputFormat; +import org.junit.Assume; +import org.junit.Before; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; @@ -61,6 +64,12 @@ public HadoopIOFormatsITCase(Configuration config) { super(config); } + @Before + public void checkOperatingSystem() { + // FLINK-5164 - see https://wiki.apache.org/hadoop/WindowsProblems + Assume.assumeTrue("This test can't run successfully on Windows.", !OperatingSystem.isWindows()); + } + @Override protected void preSubmit() throws Exception { resultPath = new String[] {getTempDirPath("result0"), getTempDirPath("result1") }; diff --git a/flink-tests/src/test/java/org/apache/flink/test/hadoop/mapred/WordCountMapredITCase.java b/flink-tests/src/test/java/org/apache/flink/test/hadoop/mapred/WordCountMapredITCase.java index 80f311a10c4d7..9528d940ac233 100644 --- a/flink-tests/src/test/java/org/apache/flink/test/hadoop/mapred/WordCountMapredITCase.java +++ b/flink-tests/src/test/java/org/apache/flink/test/hadoop/mapred/WordCountMapredITCase.java @@ -28,18 +28,27 @@ import org.apache.flink.test.testdata.WordCountData; import org.apache.flink.test.util.JavaProgramTestBase; import org.apache.flink.util.Collector; +import org.apache.flink.util.OperatingSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapred.JobConf; import org.apache.hadoop.mapred.TextInputFormat; import org.apache.hadoop.mapred.TextOutputFormat; +import org.junit.Assume; +import org.junit.Before; public class WordCountMapredITCase extends JavaProgramTestBase { protected String textPath; protected String resultPath; + @Before + public void checkOperatingSystem() { + // FLINK-5164 - see https://wiki.apache.org/hadoop/WindowsProblems + Assume.assumeTrue("This test can't run successfully on Windows.", !OperatingSystem.isWindows()); + } + @Override protected void preSubmit() throws Exception { textPath = createTempFile("text.txt", WordCountData.TEXT); diff --git a/flink-tests/src/test/java/org/apache/flink/test/hadoop/mapreduce/WordCountMapreduceITCase.java b/flink-tests/src/test/java/org/apache/flink/test/hadoop/mapreduce/WordCountMapreduceITCase.java index 32937700ddddf..64062d299ece0 100644 --- a/flink-tests/src/test/java/org/apache/flink/test/hadoop/mapreduce/WordCountMapreduceITCase.java +++ b/flink-tests/src/test/java/org/apache/flink/test/hadoop/mapreduce/WordCountMapreduceITCase.java @@ -28,18 +28,27 @@ import org.apache.flink.test.testdata.WordCountData; import org.apache.flink.test.util.JavaProgramTestBase; import org.apache.flink.util.Collector; +import org.apache.flink.util.OperatingSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.lib.input.TextInputFormat; import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat; +import org.junit.Assume; +import org.junit.Before; public class WordCountMapreduceITCase extends JavaProgramTestBase { protected String textPath; protected String resultPath; + @Before + public void checkOperatingSystem() { + // FLINK-5164 - see https://wiki.apache.org/hadoop/WindowsProblems + Assume.assumeTrue("This test can't run successfully on Windows.", !OperatingSystem.isWindows()); + } + @Override protected void preSubmit() throws Exception { textPath = createTempFile("text.txt", WordCountData.TEXT); diff --git a/flink-tests/src/test/scala/org/apache/flink/api/scala/hadoop/mapred/WordCountMapredITCase.scala b/flink-tests/src/test/scala/org/apache/flink/api/scala/hadoop/mapred/WordCountMapredITCase.scala index 6b414d65f89f6..9d04ca590bca1 100644 --- a/flink-tests/src/test/scala/org/apache/flink/api/scala/hadoop/mapred/WordCountMapredITCase.scala +++ b/flink-tests/src/test/scala/org/apache/flink/api/scala/hadoop/mapred/WordCountMapredITCase.scala @@ -21,14 +21,22 @@ import org.apache.flink.api.scala._ import org.apache.flink.hadoopcompatibility.scala.HadoopInputs import org.apache.flink.test.testdata.WordCountData import org.apache.flink.test.util.{JavaProgramTestBase, TestBaseUtils} +import org.apache.flink.util.OperatingSystem import org.apache.hadoop.fs.Path import org.apache.hadoop.io.{LongWritable, Text} import org.apache.hadoop.mapred.{FileOutputFormat, JobConf, TextInputFormat, TextOutputFormat} +import org.junit.{Assume, Before} class WordCountMapredITCase extends JavaProgramTestBase { protected var textPath: String = null protected var resultPath: String = null + @Before + def checkOperatingSystem() { + // FLINK-5164 - see https://wiki.apache.org/hadoop/WindowsProblems + Assume.assumeTrue("This test can't run successfully on Windows.", !OperatingSystem.isWindows) + } + protected override def preSubmit() { textPath = createTempFile("text.txt", WordCountData.TEXT) resultPath = getTempDirPath("result") diff --git a/flink-tests/src/test/scala/org/apache/flink/api/scala/hadoop/mapreduce/WordCountMapreduceITCase.scala b/flink-tests/src/test/scala/org/apache/flink/api/scala/hadoop/mapreduce/WordCountMapreduceITCase.scala index e393d2351361c..3b23a13b55fed 100644 --- a/flink-tests/src/test/scala/org/apache/flink/api/scala/hadoop/mapreduce/WordCountMapreduceITCase.scala +++ b/flink-tests/src/test/scala/org/apache/flink/api/scala/hadoop/mapreduce/WordCountMapreduceITCase.scala @@ -22,16 +22,24 @@ import org.apache.flink.api.scala._ import org.apache.flink.hadoopcompatibility.scala.HadoopInputs import org.apache.flink.test.testdata.WordCountData import org.apache.flink.test.util.{TestBaseUtils, JavaProgramTestBase} +import org.apache.flink.util.OperatingSystem import org.apache.hadoop.fs.Path import org.apache.hadoop.io.{Text, LongWritable} import org.apache.hadoop.mapreduce.Job import org.apache.hadoop.mapreduce.lib.input.TextInputFormat import org.apache.hadoop.mapreduce.lib.output.{FileOutputFormat, TextOutputFormat} +import org.junit.{Assume, Before} class WordCountMapreduceITCase extends JavaProgramTestBase { protected var textPath: String = null protected var resultPath: String = null + @Before + def checkOperatingSystem() { + // FLINK-5164 - see https://wiki.apache.org/hadoop/WindowsProblems + Assume.assumeTrue("This test can't run successfully on Windows.", !OperatingSystem.isWindows) + } + protected override def preSubmit() { textPath = createTempFile("text.txt", WordCountData.TEXT) resultPath = getTempDirPath("result")