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

kirs pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git


The following commit(s) were added to refs/heads/dev by this push:
     new 15e8890  [Chore] add log4j config file, when e2e test failure, print 
error log. (#1577)
15e8890 is described below

commit 15e889052a4564bcc2daa6e6ea2dca9b8a4872d0
Author: Zonglei Dong <[email protected]>
AuthorDate: Sat Mar 26 17:39:23 2022 +0800

    [Chore] add log4j config file, when e2e test failure, print error log. 
(#1577)
    
    * [Chore] Fixes code method name.
    
    * [Chore] add log4j config file, when e2e test failure, print error log.
---
 .../apache/seatunnel/e2e/flink/FlinkContainer.java |  8 ++++----
 .../e2e/flink/fake/FakeSourceToConsoleIT.java      |  2 +-
 .../e2e/flink/file/FakeSourceToFileIT.java         |  2 +-
 .../src/test/resources/log4j.properties            | 23 ++++++++++++++++++++++
 4 files changed, 29 insertions(+), 6 deletions(-)

diff --git 
a/seatunnel-e2e/seatunnel-flink-e2e/src/test/java/org/apache/seatunnel/e2e/flink/FlinkContainer.java
 
b/seatunnel-e2e/seatunnel-flink-e2e/src/test/java/org/apache/seatunnel/e2e/flink/FlinkContainer.java
index d6c2099..6e08bcb 100644
--- 
a/seatunnel-e2e/seatunnel-flink-e2e/src/test/java/org/apache/seatunnel/e2e/flink/FlinkContainer.java
+++ 
b/seatunnel-e2e/seatunnel-flink-e2e/src/test/java/org/apache/seatunnel/e2e/flink/FlinkContainer.java
@@ -39,7 +39,7 @@ import java.util.stream.Stream;
 /**
  * This class is the base class of FlinkEnvironment test.
  * The before method will create a Flink cluster, and after method will close 
the Flink cluster.
- * You can use {@link FlinkContainer#executeSeaTunnelFLinkJob} to submit a 
seatunnel config and run a seatunnel job.
+ * You can use {@link FlinkContainer#executeSeaTunnelFlinkJob} to submit a 
seatunnel config and run a seatunnel job.
  */
 public abstract class FlinkContainer {
 
@@ -84,7 +84,7 @@ public abstract class FlinkContainer {
 
         Startables.deepStart(Stream.of(jobManager)).join();
         Startables.deepStart(Stream.of(taskManager)).join();
-        copySeatunnelFlinkCoreJar();
+        copySeaTunnelFlinkCoreJar();
         LOG.info("Containers are started.");
     }
 
@@ -98,7 +98,7 @@ public abstract class FlinkContainer {
         }
     }
 
-    public Container.ExecResult executeSeaTunnelFLinkJob(String confFile) 
throws IOException, InterruptedException {
+    public Container.ExecResult executeSeaTunnelFlinkJob(String confFile) 
throws IOException, InterruptedException {
         final String confPath = getResource(confFile);
         if (!new File(confPath).exists()) {
             throw new IllegalArgumentException(confFile + " doesn't exist");
@@ -120,7 +120,7 @@ public abstract class FlinkContainer {
         return execResult;
     }
 
-    protected void copySeatunnelFlinkCoreJar() {
+    protected void copySeaTunnelFlinkCoreJar() {
         String currentModuleHome = System.getProperty("user.dir");
         String seatunnelCoreFlinkJarPath = 
currentModuleHome.replace("/seatunnel-e2e/seatunnel-flink-e2e", "")
             + 
"/seatunnel-core/seatunnel-core-flink/target/seatunnel-core-flink.jar";
diff --git 
a/seatunnel-e2e/seatunnel-flink-e2e/src/test/java/org/apache/seatunnel/e2e/flink/fake/FakeSourceToConsoleIT.java
 
b/seatunnel-e2e/seatunnel-flink-e2e/src/test/java/org/apache/seatunnel/e2e/flink/fake/FakeSourceToConsoleIT.java
index 0dc56bc..e31a754 100644
--- 
a/seatunnel-e2e/seatunnel-flink-e2e/src/test/java/org/apache/seatunnel/e2e/flink/fake/FakeSourceToConsoleIT.java
+++ 
b/seatunnel-e2e/seatunnel-flink-e2e/src/test/java/org/apache/seatunnel/e2e/flink/fake/FakeSourceToConsoleIT.java
@@ -29,7 +29,7 @@ public class FakeSourceToConsoleIT extends FlinkContainer {
 
     @Test
     public void testFakeSourceToConsoleSine() throws IOException, 
InterruptedException {
-        Container.ExecResult execResult = 
executeSeaTunnelFLinkJob("/fake/fakesource_to_console.conf");
+        Container.ExecResult execResult = 
executeSeaTunnelFlinkJob("/fake/fakesource_to_console.conf");
         Assert.assertEquals(0, execResult.getExitCode());
     }
 }
diff --git 
a/seatunnel-e2e/seatunnel-flink-e2e/src/test/java/org/apache/seatunnel/e2e/flink/file/FakeSourceToFileIT.java
 
b/seatunnel-e2e/seatunnel-flink-e2e/src/test/java/org/apache/seatunnel/e2e/flink/file/FakeSourceToFileIT.java
index 58d0d37..726c7d8 100644
--- 
a/seatunnel-e2e/seatunnel-flink-e2e/src/test/java/org/apache/seatunnel/e2e/flink/file/FakeSourceToFileIT.java
+++ 
b/seatunnel-e2e/seatunnel-flink-e2e/src/test/java/org/apache/seatunnel/e2e/flink/file/FakeSourceToFileIT.java
@@ -31,7 +31,7 @@ public class FakeSourceToFileIT extends FlinkContainer {
 
     @Test
     public void testFakeSource2FileSink() throws Exception {
-        Container.ExecResult execResult = 
executeSeaTunnelFLinkJob("/file/fakesource_to_file.conf");
+        Container.ExecResult execResult = 
executeSeaTunnelFlinkJob("/file/fakesource_to_file.conf");
         Assert.assertEquals(0, execResult.getExitCode());
     }
 }
diff --git 
a/seatunnel-e2e/seatunnel-flink-e2e/src/test/resources/log4j.properties 
b/seatunnel-e2e/seatunnel-flink-e2e/src/test/resources/log4j.properties
new file mode 100644
index 0000000..57b61a3
--- /dev/null
+++ b/seatunnel-e2e/seatunnel-flink-e2e/src/test/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.
+#
+
+# Set everything to be logged to the console
+log4j.rootCategory=ERROR, console
+log4j.appender.console=org.apache.log4j.ConsoleAppender
+log4j.appender.console.target=System.err
+log4j.appender.console.layout=org.apache.log4j.PatternLayout
+log4j.appender.console.layout.ConversionPattern=%d{yy/MM/dd HH:mm:ss} %p 
%c{1}: %m%n

Reply via email to