You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2018/07/25 03:15:59 UTC

[incubator-servicecomb-java-chassis] branch master updated (5c1c3e2 -> f7cd7c2)

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

liubao pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git.


    from 5c1c3e2  [SCB-767]change demos and revert code changes
     new f3388f8  [SCB-772]fix unit test fail on ubuntu for unknown reasons
     new 468a529  [SCB-772]turn off spring boot test debug log
     new 0c85e09  [SCB-772]license header is missing
     new 75381e3  [SCB-772]fix more tests and change IT log level to WARN to meet 4MB log limit
     new f7cd7c2  [SCB-772]revert tracing module change. Because this module have it's custom logic for Appender.

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../schema/TestConsumerSchemaFactory.java          |  3 +-
 .../src/test/resources/logback-test.xml}           |  7 +--
 .../src/main/resources/logback-test.xml}           |  7 +--
 .../src/test/resources/logback-test.xml}           |  7 +--
 .../tcp/TestAbstractTcpClientPoolFactory.java      | 15 +++----
 .../loadbalance/TestLoadBalanceHandler2.java       | 50 ++++++++--------------
 .../src/test/resources/config/log4j.z.properties   |  5 +--
 .../src/test/resources/log4j.properties            | 17 --------
 .../src/test/resources/config/log4j.z.properties   |  5 +--
 .../log4j.z.properties}                            |  3 +-
 .../src/test/resources/log4j.properties            |  2 +-
 .../src/test/resources/log4j.properties            |  2 +-
 .../src/test/resources/log4j.properties            |  2 +-
 .../src/test/resources/log4j.properties            |  2 +-
 .../src/test/resources/log4j.properties            |  2 +-
 .../src/test/resources/config/log4j.z.properties}  |  3 +-
 16 files changed, 49 insertions(+), 83 deletions(-)
 copy demo/{demo-spring-boot-transport/demo-spring-boot-pojo-server/src/main/resources/config/cse.handler.xml => demo-spring-boot-discovery/demo-spring-boot-discovery-client/src/test/resources/logback-test.xml} (84%)
 copy demo/{demo-spring-boot-transport/demo-spring-boot-pojo-server/src/main/resources/config/cse.handler.xml => demo-spring-boot-discovery/demo-spring-boot-discovery-server/src/main/resources/logback-test.xml} (84%)
 copy demo/{demo-spring-boot-transport/demo-spring-boot-pojo-server/src/main/resources/config/cse.handler.xml => demo-spring-boot-discovery/demo-spring-boot-zuul-proxy/src/test/resources/logback-test.xml} (84%)
 copy demo/demo-spring-boot-discovery/demo-spring-boot-discovery-server/src/main/resources/application.properties => integration-tests/dynamic-config-tests/src/test/resources/config/log4j.z.properties (92%)
 delete mode 100644 integration-tests/dynamic-config-tests/src/test/resources/log4j.properties
 copy demo/demo-spring-boot-discovery/demo-spring-boot-discovery-server/src/main/resources/application.properties => integration-tests/jaxrs-tests/src/test/resources/config/log4j.z.properties (92%)
 copy integration-tests/pojo-test/src/test/resources/{log4j.properties => config/log4j.z.properties} (94%)
 copy integration-tests/{spring-jaxrs-tests => spring-pojo-tests}/src/test/resources/log4j.properties (97%)
 copy integration-tests/{spring-jaxrs-tests => spring-zuul-tracing-tests}/src/test/resources/log4j.properties (97%)
 rename integration-tests/{pojo-test/src/test/resources/log4j.properties => springmvc-tests/springmvc-tests-simplified-mapping/src/test/resources/config/log4j.z.properties} (94%)


[incubator-servicecomb-java-chassis] 02/05: [SCB-772]turn off spring boot test debug log

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git

commit 468a529fe6f906d8cbfbe6ed5e5e80c59caa6af5
Author: liubao <ba...@huawei.com>
AuthorDate: Tue Jul 24 20:24:30 2018 +0800

    [SCB-772]turn off spring boot test debug log
---
 .../src/test/resources/logback-test.xml                              | 5 +++++
 .../src/main/resources/logback-test.xml                              | 5 +++++
 .../demo-spring-boot-zuul-proxy/src/test/resources/logback-test.xml  | 5 +++++
 3 files changed, 15 insertions(+)

diff --git a/demo/demo-spring-boot-discovery/demo-spring-boot-discovery-client/src/test/resources/logback-test.xml b/demo/demo-spring-boot-discovery/demo-spring-boot-discovery-client/src/test/resources/logback-test.xml
new file mode 100644
index 0000000..e3d7131
--- /dev/null
+++ b/demo/demo-spring-boot-discovery/demo-spring-boot-discovery-client/src/test/resources/logback-test.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+  <include resource="org/springframework/boot/logging/logback/base.xml"/>
+  <logger name="org.springframework" level="ERROR"/>
+</configuration>
\ No newline at end of file
diff --git a/demo/demo-spring-boot-discovery/demo-spring-boot-discovery-server/src/main/resources/logback-test.xml b/demo/demo-spring-boot-discovery/demo-spring-boot-discovery-server/src/main/resources/logback-test.xml
new file mode 100644
index 0000000..e3d7131
--- /dev/null
+++ b/demo/demo-spring-boot-discovery/demo-spring-boot-discovery-server/src/main/resources/logback-test.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+  <include resource="org/springframework/boot/logging/logback/base.xml"/>
+  <logger name="org.springframework" level="ERROR"/>
+</configuration>
\ No newline at end of file
diff --git a/demo/demo-spring-boot-discovery/demo-spring-boot-zuul-proxy/src/test/resources/logback-test.xml b/demo/demo-spring-boot-discovery/demo-spring-boot-zuul-proxy/src/test/resources/logback-test.xml
new file mode 100644
index 0000000..e3d7131
--- /dev/null
+++ b/demo/demo-spring-boot-discovery/demo-spring-boot-zuul-proxy/src/test/resources/logback-test.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+  <include resource="org/springframework/boot/logging/logback/base.xml"/>
+  <logger name="org.springframework" level="ERROR"/>
+</configuration>
\ No newline at end of file


[incubator-servicecomb-java-chassis] 05/05: [SCB-772]revert tracing module change. Because this module have it's custom logic for Appender.

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git

commit f7cd7c2b64609048b5cc787823580c19713ed19e
Author: liubao <ba...@huawei.com>
AuthorDate: Wed Jul 25 10:37:31 2018 +0800

    [SCB-772]revert tracing module change. Because this module have it's custom logic for Appender.
---
 .../servicecomb/tests/tracing/TracingTestMain.java  |  4 +---
 .../src/test/resources/config/log4j.z.properties    | 21 ---------------------
 2 files changed, 1 insertion(+), 24 deletions(-)

diff --git a/integration-tests/tracing-tests/src/test/java/org/apache/servicecomb/tests/tracing/TracingTestMain.java b/integration-tests/tracing-tests/src/test/java/org/apache/servicecomb/tests/tracing/TracingTestMain.java
index 9969c2d..ec12a81 100644
--- a/integration-tests/tracing-tests/src/test/java/org/apache/servicecomb/tests/tracing/TracingTestMain.java
+++ b/integration-tests/tracing-tests/src/test/java/org/apache/servicecomb/tests/tracing/TracingTestMain.java
@@ -18,12 +18,10 @@
 package org.apache.servicecomb.tests.tracing;
 
 import org.apache.servicecomb.foundation.common.utils.BeanUtils;
-import org.apache.servicecomb.foundation.common.utils.Log4jUtils;
 
 public class TracingTestMain {
 
-  public static void main(String[] args) throws Exception {
-    Log4jUtils.init();
+  public static void main(String[] args) {
     BeanUtils.init();
   }
 }
diff --git a/integration-tests/tracing-tests/src/test/resources/config/log4j.z.properties b/integration-tests/tracing-tests/src/test/resources/config/log4j.z.properties
deleted file mode 100644
index 02401e6..0000000
--- a/integration-tests/tracing-tests/src/test/resources/config/log4j.z.properties
+++ /dev/null
@@ -1,21 +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.logger.runLogger=WARN
-log4j.rootLogger=WARN,paas,stdout
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n


[incubator-servicecomb-java-chassis] 01/05: [SCB-772]fix unit test fail on ubuntu for unknown reasons

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git

commit f3388f85973382e547c4de493ec1374b6b8891db
Author: liubao <ba...@huawei.com>
AuthorDate: Tue Jul 24 16:45:53 2018 +0800

    [SCB-772]fix unit test fail on ubuntu for unknown reasons
---
 .../loadbalance/TestLoadBalanceHandler2.java       | 50 ++++++++--------------
 1 file changed, 18 insertions(+), 32 deletions(-)

diff --git a/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestLoadBalanceHandler2.java b/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestLoadBalanceHandler2.java
index 8a29167..a0c3c10 100644
--- a/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestLoadBalanceHandler2.java
+++ b/handlers/handler-loadbalance/src/test/java/org/apache/servicecomb/loadbalance/TestLoadBalanceHandler2.java
@@ -36,10 +36,7 @@ import org.apache.servicecomb.serviceregistry.discovery.DiscoveryTreeNode;
 import org.junit.After;
 import org.junit.Assert;
 import org.junit.Test;
-
-import mockit.Expectations;
-import mockit.Injectable;
-import mockit.Mocked;
+import org.mockito.Mockito;
 
 /**
  *
@@ -50,16 +47,16 @@ public class TestLoadBalanceHandler2 {
   @After
   public void teardown() {
     CseContext.getInstance().setTransportManager(null);
-    RegistryUtils.setServiceRegistry(null);
     ArchaiusUtils.resetConfig();
   }
 
   @Test
-  public void testZoneAwareAndIsolationFilterWorks(@Injectable Invocation invocation,
-      @Mocked RegistryUtils registryUtils,
-      @Injectable InstanceCacheManager instanceCacheManager, @Injectable ServiceRegistry serviceRegistry,
-      @Injectable TransportManager transportManager,
-      @Injectable Transport transport) {
+  public void testZoneAwareAndIsolationFilterWorks() {
+    Invocation invocation = Mockito.mock(Invocation.class);
+    InstanceCacheManager instanceCacheManager = Mockito.mock(InstanceCacheManager.class);
+    ServiceRegistry serviceRegistry = Mockito.mock(ServiceRegistry.class);
+    TransportManager transportManager = Mockito.mock(TransportManager.class);
+    Transport transport = Mockito.mock(Transport.class);
     ArchaiusUtils.setProperty("servicecomb.loadbalance.filter.operation.enabled", "false");
 
     // set up data
@@ -107,28 +104,17 @@ public class TestLoadBalanceHandler2 {
     DiscoveryTreeNode parent = new DiscoveryTreeNode().name("parent").data(data);
     CseContext.getInstance().setTransportManager(transportManager);
 
-    new Expectations() {
-      {
-        invocation.getAppId();
-        result = "testApp";
-        invocation.getMicroserviceName();
-        result = "testMicroserviceName";
-        invocation.getMicroserviceVersionRule();
-        result = "0.0.0+";
-        invocation.getConfigTransportName();
-        result = "rest";
-        RegistryUtils.getMicroserviceInstance();
-        result = myself;
-        RegistryUtils.getServiceRegistry();
-        result = serviceRegistry;
-        serviceRegistry.getInstanceCacheManager();
-        result = instanceCacheManager;
-        instanceCacheManager.getOrCreateVersionedCache("testApp", "testMicroserviceName", "0.0.0+");
-        result = parent;
-        transportManager.findTransport("rest");
-        result = transport;
-      }
-    };
+    RegistryUtils.setServiceRegistry(serviceRegistry);
+
+    Mockito.when(invocation.getAppId()).thenReturn("testApp");
+    Mockito.when(invocation.getMicroserviceName()).thenReturn("testMicroserviceName");
+    Mockito.when(invocation.getMicroserviceVersionRule()).thenReturn("0.0.0+");
+    Mockito.when(invocation.getConfigTransportName()).thenReturn("rest");
+    Mockito.when(serviceRegistry.getMicroserviceInstance()).thenReturn(myself);
+    Mockito.when(serviceRegistry.getInstanceCacheManager()).thenReturn(instanceCacheManager);
+    Mockito.when(instanceCacheManager.getOrCreateVersionedCache("testApp", "testMicroserviceName", "0.0.0+"))
+        .thenReturn(parent);
+    Mockito.when(transportManager.findTransport("rest")).thenReturn(transport);
 
     LoadbalanceHandler handler = null;
     LoadBalancer loadBalancer = null;


[incubator-servicecomb-java-chassis] 04/05: [SCB-772]fix more tests and change IT log level to WARN to meet 4MB log limit

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git

commit 75381e345e4f8a65fd12e6ecff9b4487af9e3e70
Author: liubao <ba...@huawei.com>
AuthorDate: Wed Jul 25 09:55:59 2018 +0800

    [SCB-772]fix more tests and change IT log level to WARN to meet 4MB log limit
---
 .../core/definition/schema/TestConsumerSchemaFactory.java |  3 +--
 .../client/tcp/TestAbstractTcpClientPoolFactory.java      | 15 +++++----------
 .../{log4j.properties => config/log4j.z.properties}       |  3 ++-
 .../src/test/resources/config/log4j.z.properties}         |  3 ++-
 .../{log4j.properties => config/log4j.z.properties}       |  3 ++-
 .../src/test/resources/log4j.properties                   |  2 +-
 .../src/test/resources/log4j.properties                   |  2 +-
 .../src/test/resources/log4j.properties                   |  2 +-
 .../src/test/resources/log4j.properties                   |  2 +-
 .../src/test/resources/log4j.properties                   |  2 +-
 .../src/test/resources/config/log4j.z.properties}         |  3 ++-
 .../apache/servicecomb/tests/tracing/TracingTestMain.java |  4 +++-
 .../src/test/resources/config/log4j.z.properties}         |  3 ++-
 13 files changed, 24 insertions(+), 23 deletions(-)

diff --git a/core/src/test/java/org/apache/servicecomb/core/definition/schema/TestConsumerSchemaFactory.java b/core/src/test/java/org/apache/servicecomb/core/definition/schema/TestConsumerSchemaFactory.java
index 4863e38..ec59bd7 100644
--- a/core/src/test/java/org/apache/servicecomb/core/definition/schema/TestConsumerSchemaFactory.java
+++ b/core/src/test/java/org/apache/servicecomb/core/definition/schema/TestConsumerSchemaFactory.java
@@ -27,8 +27,6 @@ import org.junit.Assert;
 import org.junit.Test;
 
 public class TestConsumerSchemaFactory {
-  private static UnitTestMeta meta = new UnitTestMeta();
-
   class TestConsumerSchemaFactoryImpl {
     public int add(int x, int y) {
       return x + y;
@@ -37,6 +35,7 @@ public class TestConsumerSchemaFactory {
 
   @Test
   public void createConsumerSchema() {
+    UnitTestMeta meta = new UnitTestMeta();
     meta.registerSchema(new PojoSwaggerGeneratorContext(), TestConsumerSchemaFactoryImpl.class);
 
     MicroserviceVersionRule microserviceVersionRule = meta.getServiceRegistry().getAppManager()
diff --git a/foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/client/tcp/TestAbstractTcpClientPoolFactory.java b/foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/client/tcp/TestAbstractTcpClientPoolFactory.java
index a95aa3f..9c7dc36 100644
--- a/foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/client/tcp/TestAbstractTcpClientPoolFactory.java
+++ b/foundations/foundation-vertx/src/test/java/org/apache/servicecomb/foundation/vertx/client/tcp/TestAbstractTcpClientPoolFactory.java
@@ -18,12 +18,10 @@ package org.apache.servicecomb.foundation.vertx.client.tcp;
 
 import org.junit.Assert;
 import org.junit.Test;
+import org.mockito.Mockito;
 
 import io.vertx.core.Context;
 import io.vertx.core.Vertx;
-import io.vertx.core.impl.VertxImpl;
-import mockit.Expectations;
-import mockit.Mocked;
 
 public class TestAbstractTcpClientPoolFactory {
   private TcpClientConfig normalClientConfig = new TcpClientConfig();
@@ -33,13 +31,10 @@ public class TestAbstractTcpClientPoolFactory {
   TcpClientPoolFactory factory = new TcpClientPoolFactory(normalClientConfig, sslClientConfig);
 
   @Test
-  public void createClientPool(@Mocked Vertx vertx, @Mocked Context context) {
-    new Expectations(VertxImpl.class) {
-      {
-        context.owner();
-        result = vertx;
-      }
-    };
+  public void createClientPool() {
+    Vertx vertx = Mockito.mock(Vertx.class);
+    Context context = Mockito.mock(Context.class);
+    Mockito.when(context.owner()).thenReturn(vertx);
     TcpClientConnectionPool pool = factory.createClientPool(context);
 
     Assert.assertSame(normalClientConfig, pool.netClientWrapper.getClientConfig(false));
diff --git a/integration-tests/dynamic-config-tests/src/test/resources/log4j.properties b/integration-tests/dynamic-config-tests/src/test/resources/config/log4j.z.properties
similarity index 92%
copy from integration-tests/dynamic-config-tests/src/test/resources/log4j.properties
copy to integration-tests/dynamic-config-tests/src/test/resources/config/log4j.z.properties
index ba21655..5520c46 100644
--- a/integration-tests/dynamic-config-tests/src/test/resources/log4j.properties
+++ b/integration-tests/dynamic-config-tests/src/test/resources/config/log4j.z.properties
@@ -14,4 +14,5 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-log4j.rootLogger=INFO
\ No newline at end of file
+log4j.logger.runLogger=WARN
+log4j.rootLogger=WARN,paas,stdout
\ No newline at end of file
diff --git a/integration-tests/dynamic-config-tests/src/test/resources/log4j.properties b/integration-tests/jaxrs-tests/src/test/resources/config/log4j.z.properties
similarity index 92%
rename from integration-tests/dynamic-config-tests/src/test/resources/log4j.properties
rename to integration-tests/jaxrs-tests/src/test/resources/config/log4j.z.properties
index ba21655..5520c46 100644
--- a/integration-tests/dynamic-config-tests/src/test/resources/log4j.properties
+++ b/integration-tests/jaxrs-tests/src/test/resources/config/log4j.z.properties
@@ -14,4 +14,5 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-log4j.rootLogger=INFO
\ No newline at end of file
+log4j.logger.runLogger=WARN
+log4j.rootLogger=WARN,paas,stdout
\ No newline at end of file
diff --git a/integration-tests/pojo-test/src/test/resources/log4j.properties b/integration-tests/pojo-test/src/test/resources/config/log4j.z.properties
similarity index 94%
rename from integration-tests/pojo-test/src/test/resources/log4j.properties
rename to integration-tests/pojo-test/src/test/resources/config/log4j.z.properties
index bc03e25..02401e6 100644
--- a/integration-tests/pojo-test/src/test/resources/log4j.properties
+++ b/integration-tests/pojo-test/src/test/resources/config/log4j.z.properties
@@ -14,7 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-log4j.rootLogger=INFO, stdout
+log4j.logger.runLogger=WARN
+log4j.rootLogger=WARN,paas,stdout
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
diff --git a/integration-tests/spring-jaxrs-tests/src/test/resources/log4j.properties b/integration-tests/spring-jaxrs-tests/src/test/resources/log4j.properties
index 63aad6d..e5addd9 100644
--- a/integration-tests/spring-jaxrs-tests/src/test/resources/log4j.properties
+++ b/integration-tests/spring-jaxrs-tests/src/test/resources/log4j.properties
@@ -15,7 +15,7 @@
 # limitations under the License.
 #
 
-log4j.rootLogger=INFO, stdout
+log4j.rootLogger=WARN, stdout
 
 # CONSOLE appender not used by default
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
diff --git a/integration-tests/spring-jaxrs-tests/src/test/resources/log4j.properties b/integration-tests/spring-pojo-tests/src/test/resources/log4j.properties
similarity index 97%
copy from integration-tests/spring-jaxrs-tests/src/test/resources/log4j.properties
copy to integration-tests/spring-pojo-tests/src/test/resources/log4j.properties
index 63aad6d..e5addd9 100644
--- a/integration-tests/spring-jaxrs-tests/src/test/resources/log4j.properties
+++ b/integration-tests/spring-pojo-tests/src/test/resources/log4j.properties
@@ -15,7 +15,7 @@
 # limitations under the License.
 #
 
-log4j.rootLogger=INFO, stdout
+log4j.rootLogger=WARN, stdout
 
 # CONSOLE appender not used by default
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
diff --git a/integration-tests/spring-jaxrs-tests/src/test/resources/log4j.properties b/integration-tests/spring-zuul-tracing-tests/src/test/resources/log4j.properties
similarity index 97%
copy from integration-tests/spring-jaxrs-tests/src/test/resources/log4j.properties
copy to integration-tests/spring-zuul-tracing-tests/src/test/resources/log4j.properties
index 63aad6d..e5addd9 100644
--- a/integration-tests/spring-jaxrs-tests/src/test/resources/log4j.properties
+++ b/integration-tests/spring-zuul-tracing-tests/src/test/resources/log4j.properties
@@ -15,7 +15,7 @@
 # limitations under the License.
 #
 
-log4j.rootLogger=INFO, stdout
+log4j.rootLogger=WARN, stdout
 
 # CONSOLE appender not used by default
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
diff --git a/integration-tests/springmvc-tests/springmvc-tests-general-with-springboot/src/test/resources/log4j.properties b/integration-tests/springmvc-tests/springmvc-tests-general-with-springboot/src/test/resources/log4j.properties
index bc03e25..705b2f7 100644
--- a/integration-tests/springmvc-tests/springmvc-tests-general-with-springboot/src/test/resources/log4j.properties
+++ b/integration-tests/springmvc-tests/springmvc-tests-general-with-springboot/src/test/resources/log4j.properties
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-log4j.rootLogger=INFO, stdout
+log4j.rootLogger=WARN, stdout
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
diff --git a/integration-tests/springmvc-tests/springmvc-tests-simplified-mapping-with-springboot/src/test/resources/log4j.properties b/integration-tests/springmvc-tests/springmvc-tests-simplified-mapping-with-springboot/src/test/resources/log4j.properties
index bc03e25..705b2f7 100644
--- a/integration-tests/springmvc-tests/springmvc-tests-simplified-mapping-with-springboot/src/test/resources/log4j.properties
+++ b/integration-tests/springmvc-tests/springmvc-tests-simplified-mapping-with-springboot/src/test/resources/log4j.properties
@@ -14,7 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-log4j.rootLogger=INFO, stdout
+log4j.rootLogger=WARN, stdout
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
diff --git a/integration-tests/springmvc-tests/springmvc-tests-general-with-springboot/src/test/resources/log4j.properties b/integration-tests/springmvc-tests/springmvc-tests-simplified-mapping/src/test/resources/config/log4j.z.properties
similarity index 94%
copy from integration-tests/springmvc-tests/springmvc-tests-general-with-springboot/src/test/resources/log4j.properties
copy to integration-tests/springmvc-tests/springmvc-tests-simplified-mapping/src/test/resources/config/log4j.z.properties
index bc03e25..02401e6 100644
--- a/integration-tests/springmvc-tests/springmvc-tests-general-with-springboot/src/test/resources/log4j.properties
+++ b/integration-tests/springmvc-tests/springmvc-tests-simplified-mapping/src/test/resources/config/log4j.z.properties
@@ -14,7 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-log4j.rootLogger=INFO, stdout
+log4j.logger.runLogger=WARN
+log4j.rootLogger=WARN,paas,stdout
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
diff --git a/integration-tests/tracing-tests/src/test/java/org/apache/servicecomb/tests/tracing/TracingTestMain.java b/integration-tests/tracing-tests/src/test/java/org/apache/servicecomb/tests/tracing/TracingTestMain.java
index ec12a81..9969c2d 100644
--- a/integration-tests/tracing-tests/src/test/java/org/apache/servicecomb/tests/tracing/TracingTestMain.java
+++ b/integration-tests/tracing-tests/src/test/java/org/apache/servicecomb/tests/tracing/TracingTestMain.java
@@ -18,10 +18,12 @@
 package org.apache.servicecomb.tests.tracing;
 
 import org.apache.servicecomb.foundation.common.utils.BeanUtils;
+import org.apache.servicecomb.foundation.common.utils.Log4jUtils;
 
 public class TracingTestMain {
 
-  public static void main(String[] args) {
+  public static void main(String[] args) throws Exception {
+    Log4jUtils.init();
     BeanUtils.init();
   }
 }
diff --git a/integration-tests/springmvc-tests/springmvc-tests-general-with-springboot/src/test/resources/log4j.properties b/integration-tests/tracing-tests/src/test/resources/config/log4j.z.properties
similarity index 94%
copy from integration-tests/springmvc-tests/springmvc-tests-general-with-springboot/src/test/resources/log4j.properties
copy to integration-tests/tracing-tests/src/test/resources/config/log4j.z.properties
index bc03e25..02401e6 100644
--- a/integration-tests/springmvc-tests/springmvc-tests-general-with-springboot/src/test/resources/log4j.properties
+++ b/integration-tests/tracing-tests/src/test/resources/config/log4j.z.properties
@@ -14,7 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-log4j.rootLogger=INFO, stdout
+log4j.logger.runLogger=WARN
+log4j.rootLogger=WARN,paas,stdout
 log4j.appender.stdout=org.apache.log4j.ConsoleAppender
 log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n


[incubator-servicecomb-java-chassis] 03/05: [SCB-772]license header is missing

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git

commit 0c85e09a6c4c528d03f195eb0171ba263eac20e1
Author: liubao <ba...@huawei.com>
AuthorDate: Tue Jul 24 20:30:23 2018 +0800

    [SCB-772]license header is missing
---
 .../src/test/resources/logback-test.xml                  | 16 ++++++++++++++++
 .../src/main/resources/logback-test.xml                  | 16 ++++++++++++++++
 .../src/test/resources/logback-test.xml                  | 16 ++++++++++++++++
 3 files changed, 48 insertions(+)

diff --git a/demo/demo-spring-boot-discovery/demo-spring-boot-discovery-client/src/test/resources/logback-test.xml b/demo/demo-spring-boot-discovery/demo-spring-boot-discovery-client/src/test/resources/logback-test.xml
index e3d7131..3f39406 100644
--- a/demo/demo-spring-boot-discovery/demo-spring-boot-discovery-client/src/test/resources/logback-test.xml
+++ b/demo/demo-spring-boot-discovery/demo-spring-boot-discovery-client/src/test/resources/logback-test.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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>
   <include resource="org/springframework/boot/logging/logback/base.xml"/>
   <logger name="org.springframework" level="ERROR"/>
diff --git a/demo/demo-spring-boot-discovery/demo-spring-boot-discovery-server/src/main/resources/logback-test.xml b/demo/demo-spring-boot-discovery/demo-spring-boot-discovery-server/src/main/resources/logback-test.xml
index e3d7131..3f39406 100644
--- a/demo/demo-spring-boot-discovery/demo-spring-boot-discovery-server/src/main/resources/logback-test.xml
+++ b/demo/demo-spring-boot-discovery/demo-spring-boot-discovery-server/src/main/resources/logback-test.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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>
   <include resource="org/springframework/boot/logging/logback/base.xml"/>
   <logger name="org.springframework" level="ERROR"/>
diff --git a/demo/demo-spring-boot-discovery/demo-spring-boot-zuul-proxy/src/test/resources/logback-test.xml b/demo/demo-spring-boot-discovery/demo-spring-boot-zuul-proxy/src/test/resources/logback-test.xml
index e3d7131..3f39406 100644
--- a/demo/demo-spring-boot-discovery/demo-spring-boot-zuul-proxy/src/test/resources/logback-test.xml
+++ b/demo/demo-spring-boot-discovery/demo-spring-boot-zuul-proxy/src/test/resources/logback-test.xml
@@ -1,4 +1,20 @@
 <?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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>
   <include resource="org/springframework/boot/logging/logback/base.xml"/>
   <logger name="org.springframework" level="ERROR"/>