You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/06/29 11:49:12 UTC

[GitHub] [apisix-java-plugin-runner] tzssangglass opened a new pull request #46: fix: disable logback, use log4j2

tzssangglass opened a new pull request #46:
URL: https://github.com/apache/apisix-java-plugin-runner/pull/46


   Please answer these questions before submitting a pull request
   
   - Why submit this pull request?
   - [x] Bugfix
   - [ ] New feature provided
   - [ ] Improve performance
   
   - Related issues
   
   ___
   ### Bugfix
   - Description
   
   - How to fix?
   
   ___
   ### New feature or improvement
   - Describe the details and related test reports.
   
   - Source branch
   
   - Related commits and pull requests
   
   - Target branch
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-java-plugin-runner] spacewander commented on a change in pull request #46: fix: disable logback, use log4j2

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #46:
URL: https://github.com/apache/apisix-java-plugin-runner/pull/46#discussion_r661057735



##########
File path: runner-core/src/test/java/org/apache/apisix/plugin/runner/handler/A6ConfigHandlerTest.java
##########
@@ -157,12 +153,11 @@ void testAddFilter3(CapturedOutput capturedOutput) {
 
         A6Conf config = cache.getIfPresent(0L);
         Assertions.assertEquals(config.getChain().getFilters().size(), 1);
-        Assertions.assertTrue(capturedOutput.getOut().contains("skip the same filter: FooFilter"));
     }
 
     @Test
     @DisplayName("test receive undefined filter")
-    void testAddFilter4(CapturedOutput capturedOutput) {

Review comment:
       Can we replace it with `System.setOut(new PrintStream(bytes));` like what you do in A6HttpCallHandlerTest.java?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-java-plugin-runner] spacewander commented on a change in pull request #46: fix: disable logback, use log4j2

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #46:
URL: https://github.com/apache/apisix-java-plugin-runner/pull/46#discussion_r661059136



##########
File path: src/main/checkstyle/checkstyle.xml
##########
@@ -28,10 +28,10 @@
         <property name="eachLine" value="true"/>
     </module>
 
-    <module name="RegexpSingleline">
-        <property name="format" value="System\.out\.println"/>
-        <property name="message" value="Prohibit invoking System.out.println in source code !"/>
-    </module>
+<!--    <module name="RegexpSingleline">-->

Review comment:
       We could make it work only in the src package?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-java-plugin-runner] tzssangglass commented on a change in pull request #46: fix: disable logback, use log4j2

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on a change in pull request #46:
URL: https://github.com/apache/apisix-java-plugin-runner/pull/46#discussion_r661072685



##########
File path: runner-core/src/test/java/org/apache/apisix/plugin/runner/handler/A6ConfigHandlerTest.java
##########
@@ -157,12 +153,11 @@ void testAddFilter3(CapturedOutput capturedOutput) {
 
         A6Conf config = cache.getIfPresent(0L);
         Assertions.assertEquals(config.getChain().getFilters().size(), 1);
-        Assertions.assertTrue(capturedOutput.getOut().contains("skip the same filter: FooFilter"));
     }
 
     @Test
     @DisplayName("test receive undefined filter")
-    void testAddFilter4(CapturedOutput capturedOutput) {

Review comment:
       Not entirely possible, as these logs are defined in the source code. and the logging for A6HttpCallHandlerTest.java is defined in the test code. I will try to work it out in another way.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-java-plugin-runner] spacewander commented on a change in pull request #46: fix: disable logback, use log4j2

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #46:
URL: https://github.com/apache/apisix-java-plugin-runner/pull/46#discussion_r661057735



##########
File path: runner-core/src/test/java/org/apache/apisix/plugin/runner/handler/A6ConfigHandlerTest.java
##########
@@ -157,12 +153,11 @@ void testAddFilter3(CapturedOutput capturedOutput) {
 
         A6Conf config = cache.getIfPresent(0L);
         Assertions.assertEquals(config.getChain().getFilters().size(), 1);
-        Assertions.assertTrue(capturedOutput.getOut().contains("skip the same filter: FooFilter"));
     }
 
     @Test
     @DisplayName("test receive undefined filter")
-    void testAddFilter4(CapturedOutput capturedOutput) {

Review comment:
       We can replace it with `System.setOut(new PrintStream(bytes));` like what you do in A6HttpCallHandlerTest.java?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-java-plugin-runner] spacewander commented on a change in pull request #46: fix: disable logback, use log4j2

Posted by GitBox <gi...@apache.org>.
spacewander commented on a change in pull request #46:
URL: https://github.com/apache/apisix-java-plugin-runner/pull/46#discussion_r661057735



##########
File path: runner-core/src/test/java/org/apache/apisix/plugin/runner/handler/A6ConfigHandlerTest.java
##########
@@ -157,12 +153,11 @@ void testAddFilter3(CapturedOutput capturedOutput) {
 
         A6Conf config = cache.getIfPresent(0L);
         Assertions.assertEquals(config.getChain().getFilters().size(), 1);
-        Assertions.assertTrue(capturedOutput.getOut().contains("skip the same filter: FooFilter"));
     }
 
     @Test
     @DisplayName("test receive undefined filter")
-    void testAddFilter4(CapturedOutput capturedOutput) {

Review comment:
       Why not replace it with `System.setOut(new PrintStream(bytes));` like what you do in A6HttpCallHandlerTest.java?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-java-plugin-runner] spacewander merged pull request #46: fix: disable logback, use log4j2

Posted by GitBox <gi...@apache.org>.
spacewander merged pull request #46:
URL: https://github.com/apache/apisix-java-plugin-runner/pull/46


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org