You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2016/02/02 18:23:34 UTC

[34/38] flink git commit: [FLINK-2348] Fix unstable IterateExampleITCase.

[FLINK-2348] Fix unstable IterateExampleITCase.

This deactivates the validation of results, which is not reliably possible under the current model (timeout on feedback).
This test for now only checks that the job executes properly.

Also adds proper logging property files for the examples projects.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/bfff86c8
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/bfff86c8
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/bfff86c8

Branch: refs/heads/master
Commit: bfff86c841f0b873f25367419db0b3dd504a1197
Parents: 6f042e7
Author: Stephan Ewen <se...@apache.org>
Authored: Mon Feb 1 17:09:38 2016 +0100
Committer: Stephan Ewen <se...@apache.org>
Committed: Tue Feb 2 16:55:45 2016 +0100

----------------------------------------------------------------------
 .../src/main/resources/log4j-test.properties    | 23 ----------------
 .../src/main/resources/log4j.properties         | 23 ++++++++++++++++
 .../src/main/resources/logback.xml              | 29 ++++++++++++++++++++
 .../iteration/IterateExampleITCase.java         |  4 ++-
 .../src/test/resources/log4j-test.properties    | 23 ++++++++++++++++
 5 files changed, 78 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/bfff86c8/flink-examples/flink-examples-batch/src/main/resources/log4j-test.properties
----------------------------------------------------------------------
diff --git a/flink-examples/flink-examples-batch/src/main/resources/log4j-test.properties b/flink-examples/flink-examples-batch/src/main/resources/log4j-test.properties
deleted file mode 100644
index 65bd0b8..0000000
--- a/flink-examples/flink-examples-batch/src/main/resources/log4j-test.properties
+++ /dev/null
@@ -1,23 +0,0 @@
-################################################################################
-#  Licensed to the Apache Software Foundation (ASF) under one
-#  or more contributor license agreements.  See the NOTICE file
-#  distributed with this work for additional information
-#  regarding copyright ownership.  The ASF licenses this file
-#  to you under the Apache License, Version 2.0 (the
-#  "License"); you may not use this file except in compliance
-#  with the License.  You may obtain a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-#  Unless required by applicable law or agreed to in writing, software
-#  distributed under the License is distributed on an "AS IS" BASIS,
-#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-#  See the License for the specific language governing permissions and
-# limitations under the License.
-################################################################################
-
-log4j.rootLogger=INFO, console
-
-log4j.appender.console=org.apache.log4j.ConsoleAppender
-log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %-60c %x - %m%n
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flink/blob/bfff86c8/flink-examples/flink-examples-streaming/src/main/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/flink-examples/flink-examples-streaming/src/main/resources/log4j.properties b/flink-examples/flink-examples-streaming/src/main/resources/log4j.properties
new file mode 100644
index 0000000..da32ea0
--- /dev/null
+++ b/flink-examples/flink-examples-streaming/src/main/resources/log4j.properties
@@ -0,0 +1,23 @@
+################################################################################
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+log4j.rootLogger=INFO, console
+
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %-60c %x - %m%n

http://git-wip-us.apache.org/repos/asf/flink/blob/bfff86c8/flink-examples/flink-examples-streaming/src/main/resources/logback.xml
----------------------------------------------------------------------
diff --git a/flink-examples/flink-examples-streaming/src/main/resources/logback.xml b/flink-examples/flink-examples-streaming/src/main/resources/logback.xml
new file mode 100644
index 0000000..95f2d04
--- /dev/null
+++ b/flink-examples/flink-examples-streaming/src/main/resources/logback.xml
@@ -0,0 +1,29 @@
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+
+<configuration>
+    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+        <encoder>
+            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{60} %X{sourceThread} - %msg%n</pattern>
+        </encoder>
+    </appender>
+
+    <root level="INFO">
+        <appender-ref ref="STDOUT"/>
+    </root>
+</configuration>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flink/blob/bfff86c8/flink-examples/flink-examples-streaming/src/test/java/org/apache/flink/streaming/test/exampleJavaPrograms/iteration/IterateExampleITCase.java
----------------------------------------------------------------------
diff --git a/flink-examples/flink-examples-streaming/src/test/java/org/apache/flink/streaming/test/exampleJavaPrograms/iteration/IterateExampleITCase.java b/flink-examples/flink-examples-streaming/src/test/java/org/apache/flink/streaming/test/exampleJavaPrograms/iteration/IterateExampleITCase.java
index 07d6766..d6e3538 100644
--- a/flink-examples/flink-examples-streaming/src/test/java/org/apache/flink/streaming/test/exampleJavaPrograms/iteration/IterateExampleITCase.java
+++ b/flink-examples/flink-examples-streaming/src/test/java/org/apache/flink/streaming/test/exampleJavaPrograms/iteration/IterateExampleITCase.java
@@ -35,7 +35,9 @@ public class IterateExampleITCase extends StreamingProgramTestBase {
 
 	@Override
 	protected void postSubmit() throws Exception {
-		compareResultsByLinesInMemory(IterateExampleData.RESULTS, resultPath);
+		// the example is inherently non-deterministic. The iteration timeout of 5000 ms
+		// is frequently not enough to make the test run stable on CI infrastructure
+		// with very small containers, so we cannot do a validation here
 	}
 
 	@Override

http://git-wip-us.apache.org/repos/asf/flink/blob/bfff86c8/flink-examples/flink-examples-streaming/src/test/resources/log4j-test.properties
----------------------------------------------------------------------
diff --git a/flink-examples/flink-examples-streaming/src/test/resources/log4j-test.properties b/flink-examples/flink-examples-streaming/src/test/resources/log4j-test.properties
new file mode 100644
index 0000000..555f17e
--- /dev/null
+++ b/flink-examples/flink-examples-streaming/src/test/resources/log4j-test.properties
@@ -0,0 +1,23 @@
+################################################################################
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################
+
+log4j.rootLogger=OFF, console
+
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %-60c %x - %m%n
\ No newline at end of file