-
Notifications
You must be signed in to change notification settings - Fork 142
Replace Pax Logging with Logback in Pax Exam tests #421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Pax Logging with Logback in Pax Exam tests #421
Conversation
…nges disables Pax Exam's preference for Pax Logging, and changes it with Logback (in the latest SLF4j 1.7.x compatible version). With this change, SLF4j and Logback are now available for both the unit tests and the pax exam tests. Configured explicit versions of all 'mavenBundle's declared in the ComponentTestBase, as otherwise Pax will depend on Maven's LATEST, which is not always compatible.
…here are unresolved bundles within the test runtime. This to avoid trying to run in a test in an inconsistent/incomplete environment (as some of the bundles were unresolved due to an incompatible version being used).
This helps a lot! |
@laeubi can you please review before i merge |
If it works and as only tests are affected it looks fine. Tools like dependabot still might complain/suggest updates. @grgrzybek can maybe give some more advice here regarding pax-logging/pax-exam updates in general. |
That is a good point; for changes like these, we should be careful with merging dependabot updates. |
A couple observations/suggestions from my side:
|
I have tried this locally already, and it is possible to directly connect the versions used within the Maven build with the versions used within the Pax Exam tests. This has the benefit that if a version is updated in Maven, it is reflected in the tests as well (and if the version is not compatible with the rest, the test will fail). This setup where the Pax Exam tests also act as a consistency check for the bundles it uses, also has its effect on the version used during compilation: concrete example, in order for this to work, I needed to update the dependency to I don't see an immediate downside to updating the version of promise, however it is a change that is reflected in the requirements of the SCR bundle; is it acceptable that Felix SCR to start requiring the promise API in version 1.1.0? |
@tjwatson is it okay to use promise 1.1.0? |
I don't see an issue because promise 1.3.0 has been out for nearly 3 years and 1.0 version is pretty old.
This is a rather unfortunate consequence of this approach. Nothing in SCR needs pushstream. That version of SCR works perfectly fine without any With all that being said, it should be fine to update our SCR dependency on |
@paulrutter can i have your okay? |
…taining these versions from the SCR maven project itself. This relies on the depends-maven-plugin on generating a properties file, that is read by the .versionAsInProject() Pax mavenBundle option API. Needed to update two existing dependencies, and add two test dependencies in order for the bundles used to be mutually consistent versions.
I have pushed commit b61b3e4 that contains these specific changes. |
Yes, it seems my concern of updating dependencies is at least covered by having tests that would break in case it would be incompatible. |
i am okay with separate commits, because they have value when show into the history. |
Related to PR #420, on getting control on the logging. This changes disables Pax Exam's preference for Pax Logging, and changes it with Logback (in the latest SLF4j 1.7.x compatible version). With this change, SLF4j and Logback are now available for both the unit tests and the pax exam tests.
Configured explicit versions of all 'mavenBundle's declared in the ComponentTestBase, as otherwise Pax will depend on Maven's LATEST, which is not always compatible. By using fixed versions (compatible with what is in the pom file), I also fixed test Felix6274Test, that I noticed failing (both on master and in #419)