[
https://issues.apache.org/jira/browse/LOG4J2-349?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ralph Goers closed LOG4J2-349.
------------------------------
Resolution: Fixed
This is handled in log4j-osgi
> Integration Test for Log4j2-bundles
> -----------------------------------
>
> Key: LOG4J2-349
> URL: https://issues.apache.org/jira/browse/LOG4J2-349
> Project: Log4j 2
> Issue Type: Test
> Components: Core, JCL Bridge, log4j 1.2 emulation
> Affects Versions: 2.0
> Environment: Apache Felix 4.x or a equivalent OSGi-container (OSGi R4
> or R5)
> Reporter: Roland Weiglhofer
> Priority: Trivial
> Labels: Integrationtest, OSGi
>
> All Log4j2 bundles should be tested in a OSGi-Container. For example, whether
> all necessary packages are exported / imported.
> One option among many:
> create a fragmented test-bundle for integration-tests (Host-bundle is the
> unit under test) and add following plugin to the pom
> ...
> <plugin>
> <groupId>org.apache.felix</groupId>
> <artifactId>maven-junit4osgi-plugin</artifactId>
> <executions>
> <execution>
> <configuration>
> <deployprojectartifact>true</deployprojectartifact>
> </configuration>
> </execution>
> </executions>
> </plugin>
> ...
> short example...
> public class Integrationtest {
> @Test
> public void testBundleActivator()
> {
> BundleContext context =
> FrameworkUtil.getBundle(MyActivator.class).getBundleContext();
> BundleActivator uut = new MyActivator();
> try {
> uut.start(context);
> } catch (Exception e) {
> fail(e);
> }
> ...
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)