PeterZh6 opened a new pull request, #11149:
URL: https://github.com/apache/inlong/pull/11149

   Fixes [[Bug] Log4j2 configuration of sort-end-to-end-test-v1.15 not working 
properly #11148](https://github.com/apache/inlong/issues/11148)
   
   ### Motivation
   
   The issue occurs when running tests in the sort-end-to-end-test-v1.15 
module, where Log4j2 fails to load the configuration from the 
log4j2-test.properties file, leading to incomplete or missing logs during the 
test runs. This issue is particularly significant as the tests are 
long-running, and prompt log feedback is essential for monitoring and debugging 
purposes.
   
   The goal of this fix is to ensure that Log4j2 correctly loads the 
log4j2-test.properties file during the test phase so that proper logging is 
restored for the end-to-end tests.
   
   ### Modifications
   **Note: This is a temporary workaround**, as the root cause of the issue 
(likely related to Maven’s resource loading or dependency exclusions) still 
needs further investigation and a permanent solution.
   - Updated the `maven-surefire-plugin` configuration in the `pom.xml` to 
**explicitly specify** the path to the `log4j2-test.properties` file using the 
system property `log4j.configurationFile`.
   - This modification ensures that the Log4j2 configuration file located in 
`src/test/resources` is correctly loaded during the test phase, thereby 
restoring proper log output during test execution.
   
   ### Verifying this change
   
   *(Please pick either of the following options)*
   
   - [ ] This change is a trivial rework/code cleanup without any test coverage.
   
   - [x] This change is already covered by existing tests, such as:
     - All existing end-to-end tests that rely on logging, where log output 
will be restored and displayed correctly during test runs.
     
   - [x] This change can be verified as follows:
     - Run `mvn test` in the `sort-end-to-end-tests-v1.15` module and confirm 
that logs are being correctly displayed as per the configuration in 
`log4j2-test.properties`.
   
   - [ ] This change added tests and can be verified as follows:
   
   
   ### Documentation
   
   - Does this pull request introduce a new feature? **No**
   - If a feature is not applicable for documentation, explain why? **This is a 
configuration fix and does not introduce new functionality.**
   - If a feature is not documented yet in this PR, please create a follow-up 
issue for adding the documentation: **Not applicable**.
   


-- 
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: commits-unsubscr...@inlong.apache.org

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

Reply via email to