[ 
https://issues.apache.org/jira/browse/KNOX-1462?focusedWorklogId=650069&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-650069
 ]

ASF GitHub Bot logged work on KNOX-1462:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Sep/21 15:13
            Start Date: 13/Sep/21 15:13
    Worklog Time Spent: 10m 
      Work Description: zeroflag commented on a change in pull request #488:
URL: https://github.com/apache/knox/pull/488#discussion_r707432233



##########
File path: 
gateway-provider-rewrite/src/test/java/org/apache/knox/gateway/filter/rewrite/api/UrlRewriteServletFilterTest.java
##########
@@ -527,41 +523,35 @@ public void 
testRequestXmlBodyRewriteWithFilterInitParam() throws Exception {
 
   @Test
   public void 
testRequestXmlBodyRewriteWithFilterInitParamForInvalidFilterConfig() throws 
Exception {
-    Enumeration<Appender> realAppenders = 
NoOpAppender.setUpAndReturnOriginalAppenders();
-    try {
-
-      Map<String,String> initParams = new HashMap<>();
-      initParams.put( "request.body", "test-filter-3" );
-      testSetUp( initParams );
-
-      String input = "<root 
url='http://mock-host:42/test-input-path-1'><url>http://mock-host:42/test-input-path-2</url></root>";
-      String expect = "<root 
url='http://mock-host:42/test-input-path-2'><url>http://mock-host:42/test-input-path-2</url></root>";
-
-      // Setup the server side request/response interaction.
-      interaction.expect()
-          .method( "PUT" )
-          .requestUrl( "http://mock-host:42/test-output-path-1"; )
-          .contentType( "text/xml" )
-          .characterEncoding( StandardCharsets.UTF_8.name() )
-          .content( expect, StandardCharsets.UTF_8 );
-      interaction.respond()
-          .status( 200 );
-      interactions.add( interaction );
-      request.setMethod( "PUT" );
-      request.setURI( "/test-input-path" );
-      //request.setVersion( "HTTP/1.1" );
-      request.setHeader( "Host", "mock-host:42" );
-      request.setHeader( "Content-Type", "text/xml; charset=UTF-8" );
-      request.setContent( input );
-
-      // Execute the request.
-      response = TestUtils.execute( server, request );
-
-      // Test the results.
-      assertThat( response.getStatus(), is( 500 ) );
-    } finally {
-      NoOpAppender.resetOriginalAppenders( realAppenders );
-    }
+    Map<String,String> initParams = new HashMap<>();

Review comment:
       I'm not quite sure what was the purpose of the NoOpAppender. It just 
temporary disabled logging while the test was running. The test doesn't check 
any log related things. The class was added in 2013 but the commit message 
doesn't contain any Jira reference so I couldn't get any info on the intent. 
I'll try find out out why it was added but so far it looks like it doesn't 
influence the test run.




-- 
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: dev-unsubscr...@knox.apache.org

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


Issue Time Tracking
-------------------

    Worklog Id:     (was: 650069)
    Time Spent: 4h 50m  (was: 4h 40m)

> Migrate from Log4j 1.x to 2.x
> -----------------------------
>
>                 Key: KNOX-1462
>                 URL: https://issues.apache.org/jira/browse/KNOX-1462
>             Project: Apache Knox
>          Issue Type: Improvement
>            Reporter: Kevin Risden
>            Assignee: Attila Magyar
>            Priority: Blocker
>             Fix For: 2.0.0
>
>          Time Spent: 4h 50m
>  Remaining Estimate: 0h
>
> Assigning to version 1.2.0 to have a discussion about it.
> Log4j 1.x went EOL in August 2015. JDK 9+ support (KNOX-1458) will require 
> Log4j 2 since Knox uses MDC for all the audit logging. More details about the 
> issue and migration are found here:
>  * [https://blogs.apache.org/logging/entry/moving_on_to_log4j_2]
>  * [https://logging.apache.org/log4j/2.x/manual/migration.html]
> Items of "concern"
>  * MDC migrate to ThreadContext
>  * log4j.properties need to migrate to log4j2.xml (or yaml or json)
> Benefits
>  * Async logging
>  * Dynamic reloading of configuration changes



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to