"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "log4j-osgi/src/test/java/org/apache/logging/log4j/osgi/tests/AbstractLoadBundleTest.java" between
apache-log4j-2.11.1-src.tar.gz and apache-log4j-2.11.2-src.tar.gz

About: Apache Log4j 2 is a logging library for Java. Source distribution (Java).

AbstractLoadBundleTest.java  (apache-log4j-2.11.1-src):AbstractLoadBundleTest.java  (apache-log4j-2.11.2-src)
skipping to change at line 233 skipping to change at line 233
api.stop(); api.stop();
core.uninstall(); core.uninstall();
api.uninstall(); api.uninstall();
} }
/** /**
* Tests LOG4J2-920. * Tests LOG4J2-920.
*/ */
@Test @Test
public void testMissingImportOfCoreOsgiPackage() throws BundleException, Ref lectiveOperationException { public void testLoadingOfConfigurableCoreClasses() throws BundleException, R eflectiveOperationException {
final Bundle api = getApiBundle(); final Bundle api = getApiBundle();
final Bundle core = getCoreBundle(); final Bundle core = getCoreBundle();
final Bundle dummy = getDummyBundle(); final Bundle dummy = getDummyBundle();
start(api, core, dummy); start(api, core, dummy);
final ByteArrayOutputStream baos = new ByteArrayOutputStream(); final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final PrintStream logStream = new PrintStream(baos); final PrintStream logStream = new PrintStream(baos);
final PrintStream bakStream = setupStream(api, logStream); final PrintStream bakStream = setupStream(api, logStream);
log(dummy); log(dummy);
setupStream(api, bakStream); setupStream(api, bakStream);
final boolean result = baos.toString().contains( // org.apache.logging.log4j.core.osgi.BundleContextSelector cannot be fo
"ERROR StatusLogger Unable to create context org.apache.logging.log4 und by org.apache.logging.log4j.api
j.core.osgi.BundleContextSelector"); final boolean result = baos.toString().contains("BundleContextSelector c
Assert.assertFalse( annot be found");
"org.apache.logging.log4j.core.osgi;resolution:=optional is missing Assert.assertFalse("Core class BundleContextSelector cannot be loaded in
in Import-Package in the POM", result); OSGI setup", result);
stop(api, core, dummy); stop(api, core, dummy);
uninstall(api, core, dummy); uninstall(api, core, dummy);
} }
/** /**
* Tests the log of a simple message in an OSGi container * Tests the log of a simple message in an OSGi container
*/ */
@Test @Test
public void testSimpleLogInAnOsgiContext() throws BundleException, Reflectiv eOperationException { public void testSimpleLogInAnOsgiContext() throws BundleException, Reflectiv eOperationException {
 End of changes. 2 change blocks. 
7 lines changed or deleted 7 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)