Github user garydgregory commented on the issue:

    https://github.com/apache/logging-log4j2/pull/92
  
    I have the whole project sources and all modules (sources) loaded in
    Eclipse so I run the one test directly from Eclipse.
    
    The commands you show will never work (did you try them?) since there is no
    log4j2-core module, it is log4j-core.
    
    So if I run:
    
    mvn clean install -pl log4j-api
    
    and:
    
    mvn clean test -pl log4j-core -Dtest=AbstractStringLayoutTest
    
    I get:
    
    [INFO] -------------------------------------------------------
    [INFO]  T E S T S
    [INFO] -------------------------------------------------------
    [INFO] Running org.apache.logging.log4j.core.layout.AbstractStringLayoutTest
    [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
    0.032 s <<< FAILURE! - in
    org.apache.logging.log4j.core.layout.AbstractStringLayoutTest
    [ERROR]
    
testGetStringBuilderCapacityRestrictedToMax(org.apache.logging.log4j.core.layout.AbstractStringLayoutTest)
     Time elapsed: 0.032 s  <<< FAILURE!
    java.lang.AssertionError: capacity, trimmed to MAX_STRING_BUILDER_SIZE
    expected:<2048> but was:<4096>
            at
    
org.apache.logging.log4j.core.layout.AbstractStringLayoutTest.testGetStringBuilderCapacityRestrictedToMax(AbstractStringLayoutTest.java:74)
    
    [INFO]
    [INFO] Results:
    [INFO]
    [ERROR] Failures:
    [ERROR]
    AbstractStringLayoutTest.testGetStringBuilderCapacityRestrictedToMax:74
    capacity, trimmed to MAX_STRING_BUILDER_SIZE expected:<2048> but was:<4096>
    [INFO]
    [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
    [INFO]
    [INFO]
    ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO]
    ------------------------------------------------------------------------
    [INFO] Total time: 53.099 s
    [INFO] Finished at: 2017-07-17T08:53:05-07:00
    [INFO] Final Memory: 43M/686M
    
    Make sure you have the latest from git master.
    
    Thank you!
    Gary
    
    On Mon, Jul 17, 2017 at 6:09 AM, Jerry <notificati...@github.com> wrote:
    
    > I reappeared the failure! when I run the tests with mvn clean test -pl
    > log4j2-core, I got the following failure (it is just the failure you
    > provided)
    >
    > [ERROR] Failures:
    > [ERROR]   
AbstractStringLayoutTest.testGetStringBuilderCapacityRestrictedToMax:74 
capacity, trimmed to MAX_STRING_BUILDER_SIZE expected:<2048> but was:<4096>
    >
    > Then I run mvn in debug mode, and find out the log4j2-api is not my local
    > code, but some code downloaded from the maven snapshot repository.
    >
    > command for running test in debug mode:
    >
    > mvn test -pl log4j-core -Dmaven.surefire.debug="-Xdebug 
-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent 
-Djava.compiler=NONE" -Dtest=AbstractStringLayoutTest
    >
    > Well, the correct command for running the test is mvn clean test -am -pl
    > log4j2-core. It will compile log4j2-core and all its dependent modules,
    > but I didn't have java9 installed, so it will always fail for the
    > log4j-api-java9. If you have java9 installed, please check it to see
    > whether it fails.
    >
    > —
    > You are receiving this because you were mentioned.
    > Reply to this email directly, view it on GitHub
    > <https://github.com/apache/logging-log4j2/pull/92#issuecomment-315750578>,
    > or mute the thread
    > 
<https://github.com/notifications/unsubscribe-auth/ABIfN_X6J_VNqM93qO3459iVX2_RUJHLks5sO1z0gaJpZM4OUANs>
    > .
    >



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to