You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Steinar Bang <sb...@dod.no> on 2020/09/28 20:59:14 UTC
Looking for a current pax exam karaf feature test code example
Does anyone have a code example for a current minimal pax exam test
loading a feature?
I'm trying to create an integration test for the PostgreSQL JDBC driver
karaf feature, so what I want is a test that loads the feature and waits
for a DataSourceFactory service.
I'm trying to make a minimal effort by copy/pasting my old integration
tests, but:
1. my tests haven't been active since I transitioned from Java 1.8 to Java 11
2. they contain too much clutter in their configuration
Thanks!
- Steinar
Re: Looking for a current pax exam karaf feature test code example
Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Yeah, that’s the goal of KarafTestSupport: provide a base for your tests and simplify the configuration.
I’m happy it helps !
Regards
JB
> Le 29 sept. 2020 à 16:59, Steinar Bang <sb...@dod.no> a écrit :
>
>>>>>> Jean-Baptiste Onofre <jb...@nanthrax.net>:
>
>> Hi,
>> You can take a look on that:
>
>> https://github.com/apache/karaf/tree/master/examples/karaf-itest-example <https://github.com/apache/karaf/tree/master/examples/karaf-itest-example>
>
> Thanks JB!
>
> Basing a test on KarafTestSupport makes testing a karaf feature incredibly simple, compared to my old pax exam setups:
> https://github.com/steinarb/pgjdbc-karaf-ci/blob/master/src/test/java/org/postgresql/pgsql/karaf/ci/PostgresqlKarafFeatureTest.java#L17
>
Re: Looking for a current pax exam karaf feature test code example
Posted by Steinar Bang <sb...@dod.no>.
>>>>> Jean-Baptiste Onofre <jb...@nanthrax.net>:
> Hi,
> You can take a look on that:
> https://github.com/apache/karaf/tree/master/examples/karaf-itest-example <https://github.com/apache/karaf/tree/master/examples/karaf-itest-example>
Thanks JB!
Basing a test on KarafTestSupport makes testing a karaf feature incredibly simple, compared to my old pax exam setups:
https://github.com/steinarb/pgjdbc-karaf-ci/blob/master/src/test/java/org/postgresql/pgsql/karaf/ci/PostgresqlKarafFeatureTest.java#L17
Re: Looking for a current pax exam karaf feature test code example
Posted by Jean-Baptiste Onofre <jb...@nanthrax.net>.
Hi,
You can take a look on that:
https://github.com/apache/karaf/tree/master/examples/karaf-itest-example <https://github.com/apache/karaf/tree/master/examples/karaf-itest-example>
Regards
JB
> Le 28 sept. 2020 à 22:59, Steinar Bang <sb...@dod.no> a écrit :
>
> Does anyone have a code example for a current minimal pax exam test
> loading a feature?
>
> I'm trying to create an integration test for the PostgreSQL JDBC driver
> karaf feature, so what I want is a test that loads the feature and waits
> for a DataSourceFactory service.
>
> I'm trying to make a minimal effort by copy/pasting my old integration
> tests, but:
> 1. my tests haven't been active since I transitioned from Java 1.8 to Java 11
> 2. they contain too much clutter in their configuration
>
> Thanks!
>
>
> - Steinar
>