Roland Weiglhofer created LOG4J2-349:
----------------------------------------
Summary: 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
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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]