[PAX-LOGGING] New integration tests

16 views
Skip to first unread message

Grzegorz Grzybek

unread,
May 14, 2019, 9:45:41 AM5/14/19
to op...@googlegroups.com
Hello

I continue my work on making pax-logging more maintainable.

The branch with work-in-progress is here - check the long(ish) readme.

Here are integration tests in 1.10.1:

Running org.ops4j.pax.logging.it.appender.CustomAppenderTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.28 sec - in org.ops4j.pax.logging.it.appender.CustomAppenderTest

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

And here are tests I did so far:

[INFO] Running org.ops4j.pax.logging.it.AllLoggingFacadesIntegrationTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.544 s - in org.ops4j.pax.logging.it.AllLoggingFacadesIntegrationTest
[INFO] Running org.ops4j.pax.logging.it.CleanIntegrationTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.428 s - in org.ops4j.pax.logging.it.CleanIntegrationTest
[INFO] Running org.ops4j.pax.logging.it.DefaultLogIntegrationTest
[INFO] Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.533 s - in org.ops4j.pax.logging.it.DefaultLogIntegrationTest
[INFO] Running org.ops4j.pax.logging.it.DefaultLogThresholdIntegrationTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.512 s - in org.ops4j.pax.logging.it.DefaultLogThresholdIntegrationTest
[INFO] Running org.ops4j.pax.logging.it.DefaultLogToFileSingletonIntegrationTest
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.486 s - in org.ops4j.pax.logging.it.DefaultLogToFileSingletonIntegrationTest
[INFO] Running org.ops4j.pax.logging.it.Log4J1IntegrationTest
[INFO] Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.729 s - in org.ops4j.pax.logging.it.Log4J1IntegrationTest
[INFO] Running org.ops4j.pax.logging.it.Log4J1RefreshPaxLoggingApiIntegrationTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.742 s - in org.ops4j.pax.logging.it.Log4J1RefreshPaxLoggingApiIntegrationTest
[INFO] Running org.ops4j.pax.logging.it.Log4J1RestartBothPaxLoggingBundlesIntegrationTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.603 s - in org.ops4j.pax.logging.it.Log4J1RestartBothPaxLoggingBundlesIntegrationTest
[INFO] Running org.ops4j.pax.logging.it.Log4J1RestartPaxLoggingApiIntegrationTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.608 s - in org.ops4j.pax.logging.it.Log4J1RestartPaxLoggingApiIntegrationTest
[INFO] Running org.ops4j.pax.logging.it.Log4J1RestartPaxLoggingServiceIntegrationTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.707 s - in org.ops4j.pax.logging.it.Log4J1RestartPaxLoggingServiceIntegrationTest
[INFO] Running org.ops4j.pax.logging.it.Log4J1WithConfigAdminIntegrationTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.632 s - in org.ops4j.pax.logging.it.Log4J1WithConfigAdminIntegrationTest
[INFO] Running org.ops4j.pax.logging.it.Log4J1WithDefaultConfigurationAndNoLog4jDebugIntegrationTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.619 s - in org.ops4j.pax.logging.it.Log4J1WithDefaultConfigurationAndNoLog4jDebugIntegrationTest
[INFO] Running org.ops4j.pax.logging.it.Log4J1WithDefaultConfigurationIntegrationTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.601 s - in org.ops4j.pax.logging.it.Log4J1WithDefaultConfigurationIntegrationTest
[INFO] Running org.ops4j.pax.logging.it.SimplestPaxLoggingServiceIntegrationTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.491 s - in org.ops4j.pax.logging.it.SimplestPaxLoggingServiceIntegrationTest
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 27, Failures: 0, Errors: 0, Skipped: 0

(Among others - tests related to restarting and refreshing pax-logging-bundles during the test).

As for API separation - I clearly described it in new readme - some org.apache.log4j.* packages are imported from pax-logging-api to pax-logging-service, but some has to be shaded there.
I ensured that the classes that are not changed comparing to original classes from log4j:log4j are not kept in pax-logging source tree.

I have good foundation to unify logback and log4j2 itests and make two kinds of extensibility common to all the backends:
 - through fragments attached to pax-logging-service, pax-logging-logback and pax-logging-log4j2
 - through registration of services implementing org.ops4j.pax.logging.spi interfaces, and referenced by "osgi:" prefixed entries in config files.

regards
Grzegorz Grzybek

Grzegorz Grzybek

unread,
May 16, 2019, 11:40:00 AM5/16/19
to op...@googlegroups.com
Hello!

Even more integration tests (including Logback) - I finally created the tests I always wanted - that restart/refresh pax-logging bundles inside the test itself!

I finished Log4J1 cleanup, the API/Implementation is separated the best way I could do it. Everything is described in the readme - https://github.com/ops4j/org.ops4j.pax.logging/blob/master-improvements/readme.adoc.
I even described *all* packages from log4j:log4j and log4j:apache-log4j-extras: https://github.com/ops4j/org.ops4j.pax.logging/tree/master-improvements#summary-of-package-splitting-for-log4j1 - where does given package come from, in which bundles it's Private-Packaged or Export-Packaged (or both!).
There's even nice table summarizing log levels/thresholds for Syslog/Log4J1/Log4J2/Logback/Slf4J/JUL/OSGi: https://github.com/ops4j/org.ops4j.pax.logging/blob/master-improvements/readme.adoc#level-and-threshold

I took care that pax-logging project doesn't include *any* unchanged source file from log4j (or extras) - everything is either included and changed, or embedded using Private|Export-Package or maven-dependency-plugin:unpack (yes - it was needed). Details are described in:

 – [INFO] Tests run: 1, Time elapsed: 1.264 s - AllLoggingFacadesIntegrationTest
 – [INFO] Tests run: 1, Time elapsed: 1.254 s - CleanIntegrationTest
 – [INFO] Tests run: 4, Time elapsed: 1.310 s - DefaultLogIntegrationTest
 – [INFO] Tests run: 2, Time elapsed: 1.349 s - DefaultLogThresholdIntegrationTest
 – [INFO] Tests run: 2, Time elapsed: 1.343 s - DefaultLogToFileSingletonIntegrationTest
 – [INFO] Tests run: 4, Time elapsed: 1.511 s - Log4J1BuiltinAppendersIntegrationTest
 – [INFO] Tests run: 9, Time elapsed: 1.498 s - Log4J1IntegrationTest
 – [INFO] Tests run: 1, Time elapsed: 1.436 s - Log4J1LocationInfoIntegrationTest
 – [INFO] Tests run: 1, Time elapsed: 1.403 s - Log4J1MDCIntegrationTest
 – [INFO] Tests run: 1, Time elapsed: 1.355 s - Log4J1OsgiAppendersIntegrationTest
 – [INFO] Tests run: 1, Time elapsed: 1.360 s - Log4J1OsgiErrorHandlersIntegrationTest
 – [INFO] Tests run: 2, Time elapsed: 1.430 s - Log4J1OsgiLayoutsIntegrationTest
 – [INFO] Tests run: 1, Time elapsed: 1.414 s - Log4J1RefreshPaxLoggingApiIntegrationTest
 – [INFO] Tests run: 1, Time elapsed: 1.521 s - Log4J1RestartBothPaxLoggingBundlesIntegrationTest
 – [INFO] Tests run: 1, Time elapsed: 1.441 s - Log4J1RestartPaxLoggingApiIntegrationTest
 – [INFO] Tests run: 1, Time elapsed: 1.529 s - Log4J1RestartPaxLoggingServiceIntegrationTest
 – [INFO] Tests run: 1, Time elapsed: 1.455 s - Log4J1UpdateJULLoggerLevelsIntegrationTest
 – [INFO] Tests run: 1, Time elapsed: 3.390 s - Log4J1WithConfigAdminIntegrationTest
 – [INFO] Tests run: 1, Time elapsed: 1.457 s - Log4J1WithDefaultConfigurationAndNoLog4jDebugIntegrationTest
 – [INFO] Tests run: 1, Time elapsed: 1.363 s - Log4J1WithDefaultConfigurationIntegrationTest
 – [INFO] Tests run: 1, Time elapsed: 1.458 s - Log4J1WithoutEventAdminIntegrationTest
 – [INFO] Tests run: 4, Time elapsed: 1.411 s - LogbackIntegrationTest
 – [INFO] Tests run: 1, Time elapsed: 3.374 s - LogbackWithConfigAdminIntegrationTest
 – [INFO] Tests run: 1, Time elapsed: 1.423 s - LogbackWithDefaultConfigurationAndNoLogbackDebugIntegrationTest
 – [INFO] Tests run: 1, Time elapsed: 1.406 s - LogbackWithDefaultConfigurationIntegrationTest
 – [INFO] Tests run: 1, Time elapsed: 1.352 s - LogbackWithoutEventAdminIntegrationTest
 – [INFO] Tests run: 1, Time elapsed: 1.356 s - SimplestPaxLoggingServiceIntegrationTest

best regards
Grzegorz Grzybek

françois papon

unread,
May 17, 2019, 10:59:49 AM5/17/19
to op...@googlegroups.com
Great work!

Thanks ;)

regards,

François


--
--
------------------
OPS4J - http://www.ops4j.org - op...@googlegroups.com

---
You received this message because you are subscribed to the Google Groups "OPS4J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ops4j+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ops4j/CAAdXmhoFH7YeLNWRnf8OT0H3jNiWFH6ekd8ymezUYUv20f-DFg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Jean-Baptiste Onofré

unread,
May 17, 2019, 11:19:34 AM5/17/19
to op...@googlegroups.com

Awesome ! Thanks !

I will take a look during the weekend.

Cheers
JB

--

Grzegorz Grzybek

unread,
May 21, 2019, 4:51:11 AM5/21/19
to op...@googlegroups.com
Hello

64 integration tests so far.

What I covered since last time is full (IMO) support for pax-logging-logback, testing rolling appenders, server socket appenders, restarts/refreshes, MDC and json/jackson layout from logback.contrib.

Now the remaining things are:
 - coverage of Log4J2 cases (including some unresolved PAXLOGGING issues)
 - R7 support

When we're ready, from currently 21 unresolved PAXLOGGING issues, I expect to resolve 19 (some are already resolved in master-improvements branch). The ones I won't (plan to) resolve are:
 - PAXLOGGING-151: Colors in file logs
 - PAXLOGGING-212: Leaked UDP ports from the logging using MDCSiftingAppender (which is more of configuration nature)

[INFO] Tests run: 1, ..., Time elapsed: 1.330 s - in org.ops4j.pax.logging.it.AllLoggingFacadesIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.212 s - in org.ops4j.pax.logging.it.CleanIntegrationTest
[INFO] Tests run: 4, ..., Time elapsed: 1.361 s - in org.ops4j.pax.logging.it.DefaultLogIntegrationTest
[INFO] Tests run: 2, ..., Time elapsed: 1.273 s - in org.ops4j.pax.logging.it.DefaultLogThresholdIntegrationTest
[INFO] Tests run: 2, ..., Time elapsed: 1.312 s - in org.ops4j.pax.logging.it.DefaultLogToFileSingletonIntegrationTest
[INFO] Tests run: 6, ..., Time elapsed: 1.530 s - in org.ops4j.pax.logging.it.Log4J1BuiltinAppendersIntegrationTest
[INFO] Tests run: 9, ..., Time elapsed: 1.621 s - in org.ops4j.pax.logging.it.Log4J1IntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.464 s - in org.ops4j.pax.logging.it.Log4J1LocationInfoIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.395 s - in org.ops4j.pax.logging.it.Log4J1MDCIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.457 s - in org.ops4j.pax.logging.it.Log4J1OsgiAppendersIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.426 s - in org.ops4j.pax.logging.it.Log4J1OsgiErrorHandlersIntegrationTest
[INFO] Tests run: 2, ..., Time elapsed: 1.475 s - in org.ops4j.pax.logging.it.Log4J1OsgiLayoutsIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.578 s - in org.ops4j.pax.logging.it.Log4J1RefreshPaxLoggingApiIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.402 s - in org.ops4j.pax.logging.it.Log4J1RestartBothPaxLoggingBundlesIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.364 s - in org.ops4j.pax.logging.it.Log4J1RestartPaxLoggingApiIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.431 s - in org.ops4j.pax.logging.it.Log4J1RestartPaxLoggingServiceIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.390 s - in org.ops4j.pax.logging.it.Log4J1UpdateJULLoggerLevelsIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 3.367 s - in org.ops4j.pax.logging.it.Log4J1WithConfigAdminIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.539 s - in org.ops4j.pax.logging.it.Log4J1WithDefaultConfigurationAndNoLog4jDebugIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.383 s - in org.ops4j.pax.logging.it.Log4J1WithDefaultConfigurationIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.323 s - in org.ops4j.pax.logging.it.Log4J1WithoutEventAdminIntegrationTest
[INFO] Tests run: 6, ..., Time elapsed: 1.625 s - in org.ops4j.pax.logging.it.LogbackBuiltinAppendersIntegrationTest
[INFO] Tests run: 4, ..., Time elapsed: 1.369 s - in org.ops4j.pax.logging.it.LogbackIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.612 s - in org.ops4j.pax.logging.it.LogbackJacksonLayoutIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.497 s - in org.ops4j.pax.logging.it.LogbackLocationInfoIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.515 s - in org.ops4j.pax.logging.it.LogbackMDCIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.480 s - in org.ops4j.pax.logging.it.LogbackOsgiAppendersIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.475 s - in org.ops4j.pax.logging.it.LogbackRefreshPaxLoggingApiIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.443 s - in org.ops4j.pax.logging.it.LogbackRestartBothPaxLoggingBundlesIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.382 s - in org.ops4j.pax.logging.it.LogbackRestartPaxLoggingApiIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.377 s - in org.ops4j.pax.logging.it.LogbackRestartPaxLoggingLogbackIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.485 s - in org.ops4j.pax.logging.it.LogbackUpdateJULLoggerLevelsIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 3.454 s - in org.ops4j.pax.logging.it.LogbackWithConfigAdminIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.394 s - in org.ops4j.pax.logging.it.LogbackWithDefaultConfigurationAndNoLogbackDebugIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.349 s - in org.ops4j.pax.logging.it.LogbackWithDefaultConfigurationIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.340 s - in org.ops4j.pax.logging.it.LogbackWithoutEventAdminIntegrationTest
[INFO] Tests run: 1, ..., Time elapsed: 1.244 s - in org.ops4j.pax.logging.it.SimplestPaxLoggingServiceIntegrationTest

(remember - previously there was only one integration test - org.ops4j.pax.logging.it.appender.CustomAppenderTest)

best regards
Grzegorz Grzybek

Reply all
Reply to author
Forward
0 new messages