[
https://issues.apache.org/jira/browse/LOG4J2-1664?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15740413#comment-15740413
]
Ludovic HOCHET edited comment on LOG4J2-1664 at 12/11/16 9:52 PM:
------------------------------------------------------------------
patch-log4j2-1664-3.diff
adds 2 tests to AbstractLoadBundleTest:
_ testApiCoreStartStopStartStop() which tests that API and core
load/start/stop/start/stop/uninstall correctly (was testLoadStartStop() in the
previous OSGi tests)
_ testLog4J12Fragement() which tests if the 1.2 Compatibility API fragment
loads and is properly attached to the Core host by loading
org.apache.log4j.Level that is declared in the 1.2 API bundle and checking that
is has the same class loader as org.apache.logging.log4j.core.Core but not the
same class loader as org.apache.logging.log4j.Level with all 3 classes loaded
from the core bundle
The patch also removes the old tests from API, Core and 1.2 Compatibility API
since they now have equivalents in log4j-osgi which don't require to build
Log4J once before running them (the patch also adjust BUILDING.txt to remove
the OSGi test paragraphe)
{noformat}
mvn clean
then
mvn install
------------------------------------------------------------------------
Reactor Summary:
Apache Log4j 2 ..................................... SUCCESS [ 1.561 s]
Apache Log4j API ................................... SUCCESS [ 20.446 s]
Apache Log4j Core .................................. SUCCESS [15:22 min]
Apache Log4j 1.x Compatibility API ................. SUCCESS [ 9.018 s]
Apache Log4j SLF4J Binding ......................... SUCCESS [ 5.581 s]
Apache Log4j to SLF4J Adapter ...................... SUCCESS [ 3.427 s]
Apache Log4j Commons Logging Bridge ................ SUCCESS [ 3.038 s]
Apache Log4j Flume Bridge .......................... SUCCESS [ 29.509 s]
Apache Log4j Web ................................... SUCCESS [ 6.067 s]
Apache Log4j Tag Library ........................... SUCCESS [ 14.639 s]
Apache Log4j JMX GUI ............................... SUCCESS [ 2.124 s]
Apache Log4j Samples ............................... SUCCESS [ 0.150 s]
Apache Log4j Samples: Flume - Common ............... SUCCESS [ 2.383 s]
Apache Log4j Samples: Flume - Remote ............... SUCCESS [ 2.097 s]
Apache Log4j Samples: Flume - Embedded ............. SUCCESS [ 4.551 s]
Apache Log4j Samples: Configuration ................ SUCCESS [ 2.822 s]
Apache Log4j Samples: LoggerProperties ............. SUCCESS [ 2.898 s]
Apache Log4j Scala 2.11 wrapper for Log4j API ...... SUCCESS [ 18.534 s]
Apache Log4j Samples: Scala API .................... SUCCESS [ 3.866 s]
Apache Log4j OSGi .................................. SUCCESS [ 4.556 s]
Apache Log4j BOM ................................... SUCCESS [ 0.672 s]
Apache Log4j NoSQL ................................. SUCCESS [ 4.672 s]
Apache Log4J Performance Tests ..................... SUCCESS [ 14.126 s]
Apache Log4j Streaming Interface ................... SUCCESS [ 9.053 s]
Apache Log4j JUL Adapter ........................... SUCCESS [ 9.610 s]
Apache Log4j Liquibase Binding ..................... SUCCESS [ 2.671 s]
Apache Log4j Scala 2.10 wrapper for Log4j API ...... SUCCESS [ 20.031 s]
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 18:42 min
Finished at: 2016-12-11T22:16:50+01:00
Final Memory: 47M/544M
------------------------------------------------------------------------
{noformat}
was (Author: lhochet):
patch-log4j2-1664-3.diff
adds 2 tests to AbstractLoadBundleTest:
_ testApiCoreStartStopStartStop() which tests that API and core
load/start/stop/start/stop/uninstall correctly (was testLoadStartStop() in the
previous OSGi tests)
_ testLog4J12Fragement() which tests if the 1.2 Compatibility API fragment
loads and is properly attached to the Core host by loading
org.apache.log4j.Level that is declared in the 1.2 API bundle and checking that
is has the same class loader as org.apache.logging.log4j.core.Core but not the
same class loader as org.apache.logging.log4j.Level with all 3 classes loaded
from the core bundle
The patch also removes the old tests from API, Core and 1.2 Compatibility API
since they now have equivalents in log4j-osgi which don't require to build
Log4J once before running them (the patch also adjust BUILDING.txt to remove
the OSGi test paragraphe)
{quote}
mvn clean
then
mvn install
------------------------------------------------------------------------
Reactor Summary:
Apache Log4j 2 ..................................... SUCCESS [ 1.561 s]
Apache Log4j API ................................... SUCCESS [ 20.446 s]
Apache Log4j Core .................................. SUCCESS [15:22 min]
Apache Log4j 1.x Compatibility API ................. SUCCESS [ 9.018 s]
Apache Log4j SLF4J Binding ......................... SUCCESS [ 5.581 s]
Apache Log4j to SLF4J Adapter ...................... SUCCESS [ 3.427 s]
Apache Log4j Commons Logging Bridge ................ SUCCESS [ 3.038 s]
Apache Log4j Flume Bridge .......................... SUCCESS [ 29.509 s]
Apache Log4j Web ................................... SUCCESS [ 6.067 s]
Apache Log4j Tag Library ........................... SUCCESS [ 14.639 s]
Apache Log4j JMX GUI ............................... SUCCESS [ 2.124 s]
Apache Log4j Samples ............................... SUCCESS [ 0.150 s]
Apache Log4j Samples: Flume - Common ............... SUCCESS [ 2.383 s]
Apache Log4j Samples: Flume - Remote ............... SUCCESS [ 2.097 s]
Apache Log4j Samples: Flume - Embedded ............. SUCCESS [ 4.551 s]
Apache Log4j Samples: Configuration ................ SUCCESS [ 2.822 s]
Apache Log4j Samples: LoggerProperties ............. SUCCESS [ 2.898 s]
Apache Log4j Scala 2.11 wrapper for Log4j API ...... SUCCESS [ 18.534 s]
Apache Log4j Samples: Scala API .................... SUCCESS [ 3.866 s]
Apache Log4j OSGi .................................. SUCCESS [ 4.556 s]
Apache Log4j BOM ................................... SUCCESS [ 0.672 s]
Apache Log4j NoSQL ................................. SUCCESS [ 4.672 s]
Apache Log4J Performance Tests ..................... SUCCESS [ 14.126 s]
Apache Log4j Streaming Interface ................... SUCCESS [ 9.053 s]
Apache Log4j JUL Adapter ........................... SUCCESS [ 9.610 s]
Apache Log4j Liquibase Binding ..................... SUCCESS [ 2.671 s]
Apache Log4j Scala 2.10 wrapper for Log4j API ...... SUCCESS [ 20.031 s]
------------------------------------------------------------------------
BUILD SUCCESS
------------------------------------------------------------------------
Total time: 18:42 min
Finished at: 2016-12-11T22:16:50+01:00
Final Memory: 47M/544M
------------------------------------------------------------------------
{quote}
> Improve OSGi unit tests
> -----------------------
>
> Key: LOG4J2-1664
> URL: https://issues.apache.org/jira/browse/LOG4J2-1664
> Project: Log4j 2
> Issue Type: Improvement
> Components: API, Core
> Affects Versions: 2.7
> Reporter: Ludovic HOCHET
> Fix For: 2.8
>
> Attachments: patch-log4j2-1664-2.diff, patch-log4j2-1664-3.diff
>
>
> Following up on LOG4J2-1637, this ticket is to improve the OSGi unit tests.
> Ideally they should catch issues like LOG4J2-1637, but other improvements are
> welcome too.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]