You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by Ioannis Canellos <io...@gmail.com> on 2011/12/09 11:02:23 UTC

[PROPOSAL] Convert OSGi integration test to pax-exam-karaf

Hi guys,

I'd like to propose to convert our osgi integration tests from pax-exam 1.x
to pax-exam-karaf (which uses pax-exam 2.x).

*The problem*
Our test are currently based on pax-exam 1.x. We build our test by creating
a pseudo karaf instance over pax-exam by installing all the bundles we need.
That is really cluttered and is really hard to maintain, since for every
change in karafs dependencies we have to go all over the bundle list and
see which artifacts were renamed, splitted or got new dependencies.
That's a problem we have nearly every time we upgrade the karaf version
inside the nmr.

*The side effect*
I think that this problem prevents us from adding more integration tests,
since maintenance will become unbearable.
But I do think that adding more tests is really needed. For example, we
don't have a test that can tell us that our container even starts (not to
say that bundle are started, or services are available).

*The proposed solution*
I propose to rewrite the integration tests based on
https://github.com/openengsb/labs-paxexam-karaf.
I have used this on several projects so far and it did really make a
difference for me. I would say its the "selenium tests" for karaf.

The value it brings to the table is that it allows you to run your tests
directly inside your custom distribution (in our case directly in
servicemix-nmr or servicemix distribution) and it save us the trouble of
building it bundle by bundle.
The tests run inside the real distribution with all its features available
(from deployers and managed service factories to admin features).

wdyt?

-- 
*Ioannis Canellos*
*
FuseSource <http://fusesource.com>

**
Blog: http://iocanel.blogspot.com
**
Apache Karaf <http://karaf.apache.org/> Committer & PMC
Apache Camel <http://camel.apache.org/> Committer
Apache ServiceMix <http://servicemix.apache.org/>  Committer
Apache Gora <http://incubator.apache.org/gora/> Committer
Apache DirectMemory <http://incubator.apache.org/directmemory/> Committer
*

Re: [PROPOSAL] Convert OSGi integration test to pax-exam-karaf

Posted by Ioannis Canellos <io...@gmail.com>.
>
> I would prefer to use the "Apache" version of the pax-exam-karaf ;)
>

Me too, but the "apache" version of pax-exam-karaf is currently bound to
Karaf 3.0.0 and it complicates things as you already mentioned.

-- 
*Ioannis Canellos*
*
FuseSource <http://fusesource.com>

**
Blog: http://iocanel.blogspot.com
**
Apache Karaf <http://karaf.apache.org/> Committer & PMC
Apache Camel <http://camel.apache.org/> Committer
Apache ServiceMix <http://servicemix.apache.org/>  Committer
Apache Gora <http://incubator.apache.org/gora/> Committer
Apache DirectMemory <http://incubator.apache.org/directmemory/> Committer
*

Re: [PROPOSAL] Convert OSGi integration test to pax-exam-karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
I would prefer to use the "Apache" version of the pax-exam-karaf ;)

Regards
JB

On 12/09/2011 03:45 PM, Ioannis Canellos wrote:
> Currently we don't have to refer to karaf trunk at all. We can just use
> pax-exam-karaf (as is on github and released to maven central).
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [PROPOSAL] Convert OSGi integration test to pax-exam-karaf

Posted by Ioannis Canellos <io...@gmail.com>.
Currently we don't have to refer to karaf trunk at all. We can just use
pax-exam-karaf (as is on github and released to maven central).

-- 
*Ioannis Canellos*
*
FuseSource <http://fusesource.com>

**
Blog: http://iocanel.blogspot.com
**
Apache Karaf <http://karaf.apache.org/> Committer & PMC
Apache Camel <http://camel.apache.org/> Committer
Apache ServiceMix <http://servicemix.apache.org/>  Committer
Apache Gora <http://incubator.apache.org/gora/> Committer
Apache DirectMemory <http://incubator.apache.org/directmemory/> Committer
*

Re: [PROPOSAL] Convert OSGi integration test to pax-exam-karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Yes yes, agree that Karaf PaxExam is compatible with Karaf 2.2.x.

I'm just talking about the dependencies in the POM.

As I said, it's not a big deal ;)

Regards
JB

On 12/09/2011 02:04 PM, Andreas Pieber wrote:
> Hey JB
>
> On Fri, Dec 9, 2011 at 13:21, Jean-Baptiste Onofré<jb...@nanthrax.net>  wrote:
>
>> Hi Andreas,
>>
>> maybe I missed something, but AFAIR, "Karaf PaxExam" has been committed
>> only on Karaf trunk.
>>
>> It means that in the SMX pom, I will have:
>> - karaf 2.2.x version (currently) for the SMX assemblies and unit tests
>> - karaf 3.0-SNAPSHOT only for the "Karaf PaxExam"
>
>
> If you do this yes. BTW, there wouldn't be any problem here. "Karaf
> PaxExam" is also backward compatible to 2.2.x. Still, I think
> labs-paxexam-karaf is the better option till 3.0 is released (since you do
> not have to rely on snapshots). As said, the switch is pretty simple
> afterwards.
>
> Kind regards,
> Andreas
>
>
>>
>> Am I wrong ?
>>
>> Regards
>> JB
>>
>>
>> On 12/09/2011 01:12 PM, Andreas Pieber wrote:
>>
>>> Basically +1; The only real difference between pax-exam-karaf on github
>>> and
>>> the code on karaf trunk are the namespaces. Therefore I think a start with
>>> the github version is OK, since a switch to the one in karaf 3 (once it is
>>> released) is extremly straight forward.
>>>
>>> @JB I don't understand what you mean by double? for the smx distribution
>>> basing on karaf 2.x simply use pax-exam-karaf and for those basing on
>>> karaf-3 the karaf trunk version.
>>>
>>> WDYT?
>>>
>>> Kind regards,
>>> Andreas
>>>
>>> On Fri, Dec 9, 2011 at 11:59, Jean-Baptiste Onofré<jb...@nanthrax.net>
>>>   wrote:
>>>
>>>   Agree,
>>>>
>>>> but it means that we have a "double" dependency:
>>>> - karaf 2.2.4 for itests + assembly
>>>> - karaf 3.0-SNAPSHOT for PaxExam
>>>>
>>>> It's not a big deal.
>>>>
>>>> Regards
>>>> JB
>>>>
>>>>
>>>> On 12/09/2011 11:57 AM, Ioannis Canellos wrote:
>>>>
>>>>   To be honest I don't see what is the benefit of waiting for Karaf 3.0.0
>>>>> really is.
>>>>>
>>>>> pax-exam-karaf is also released independently and that allows us to use
>>>>> it
>>>>> straight ahead.
>>>>>
>>>>>
>>>>>   --
>>>> Jean-Baptiste Onofré
>>>> jbonofre@apache.org
>>>> http://blog.nanthrax.net
>>>> Talend - http://www.talend.com
>>>>
>>>>
>>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [PROPOSAL] Convert OSGi integration test to pax-exam-karaf

Posted by Andreas Pieber <an...@gmail.com>.
Hey JB

On Fri, Dec 9, 2011 at 13:21, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:

> Hi Andreas,
>
> maybe I missed something, but AFAIR, "Karaf PaxExam" has been committed
> only on Karaf trunk.
>
> It means that in the SMX pom, I will have:
> - karaf 2.2.x version (currently) for the SMX assemblies and unit tests
> - karaf 3.0-SNAPSHOT only for the "Karaf PaxExam"


If you do this yes. BTW, there wouldn't be any problem here. "Karaf
PaxExam" is also backward compatible to 2.2.x. Still, I think
labs-paxexam-karaf is the better option till 3.0 is released (since you do
not have to rely on snapshots). As said, the switch is pretty simple
afterwards.

Kind regards,
Andreas


>
> Am I wrong ?
>
> Regards
> JB
>
>
> On 12/09/2011 01:12 PM, Andreas Pieber wrote:
>
>> Basically +1; The only real difference between pax-exam-karaf on github
>> and
>> the code on karaf trunk are the namespaces. Therefore I think a start with
>> the github version is OK, since a switch to the one in karaf 3 (once it is
>> released) is extremly straight forward.
>>
>> @JB I don't understand what you mean by double? for the smx distribution
>> basing on karaf 2.x simply use pax-exam-karaf and for those basing on
>> karaf-3 the karaf trunk version.
>>
>> WDYT?
>>
>> Kind regards,
>> Andreas
>>
>> On Fri, Dec 9, 2011 at 11:59, Jean-Baptiste Onofré<jb...@nanthrax.net>
>>  wrote:
>>
>>  Agree,
>>>
>>> but it means that we have a "double" dependency:
>>> - karaf 2.2.4 for itests + assembly
>>> - karaf 3.0-SNAPSHOT for PaxExam
>>>
>>> It's not a big deal.
>>>
>>> Regards
>>> JB
>>>
>>>
>>> On 12/09/2011 11:57 AM, Ioannis Canellos wrote:
>>>
>>>  To be honest I don't see what is the benefit of waiting for Karaf 3.0.0
>>>> really is.
>>>>
>>>> pax-exam-karaf is also released independently and that allows us to use
>>>> it
>>>> straight ahead.
>>>>
>>>>
>>>>  --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>>
>>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: [PROPOSAL] Convert OSGi integration test to pax-exam-karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Andreas,

maybe I missed something, but AFAIR, "Karaf PaxExam" has been committed 
only on Karaf trunk.

It means that in the SMX pom, I will have:
- karaf 2.2.x version (currently) for the SMX assemblies and unit tests
- karaf 3.0-SNAPSHOT only for the "Karaf PaxExam"

Am I wrong ?

Regards
JB

On 12/09/2011 01:12 PM, Andreas Pieber wrote:
> Basically +1; The only real difference between pax-exam-karaf on github and
> the code on karaf trunk are the namespaces. Therefore I think a start with
> the github version is OK, since a switch to the one in karaf 3 (once it is
> released) is extremly straight forward.
>
> @JB I don't understand what you mean by double? for the smx distribution
> basing on karaf 2.x simply use pax-exam-karaf and for those basing on
> karaf-3 the karaf trunk version.
>
> WDYT?
>
> Kind regards,
> Andreas
>
> On Fri, Dec 9, 2011 at 11:59, Jean-Baptiste Onofré<jb...@nanthrax.net>  wrote:
>
>> Agree,
>>
>> but it means that we have a "double" dependency:
>> - karaf 2.2.4 for itests + assembly
>> - karaf 3.0-SNAPSHOT for PaxExam
>>
>> It's not a big deal.
>>
>> Regards
>> JB
>>
>>
>> On 12/09/2011 11:57 AM, Ioannis Canellos wrote:
>>
>>> To be honest I don't see what is the benefit of waiting for Karaf 3.0.0
>>> really is.
>>>
>>> pax-exam-karaf is also released independently and that allows us to use it
>>> straight ahead.
>>>
>>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [PROPOSAL] Convert OSGi integration test to pax-exam-karaf

Posted by Andreas Pieber <an...@gmail.com>.
Basically +1; The only real difference between pax-exam-karaf on github and
the code on karaf trunk are the namespaces. Therefore I think a start with
the github version is OK, since a switch to the one in karaf 3 (once it is
released) is extremly straight forward.

@JB I don't understand what you mean by double? for the smx distribution
basing on karaf 2.x simply use pax-exam-karaf and for those basing on
karaf-3 the karaf trunk version.

WDYT?

Kind regards,
Andreas

On Fri, Dec 9, 2011 at 11:59, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:

> Agree,
>
> but it means that we have a "double" dependency:
> - karaf 2.2.4 for itests + assembly
> - karaf 3.0-SNAPSHOT for PaxExam
>
> It's not a big deal.
>
> Regards
> JB
>
>
> On 12/09/2011 11:57 AM, Ioannis Canellos wrote:
>
>> To be honest I don't see what is the benefit of waiting for Karaf 3.0.0
>> really is.
>>
>> pax-exam-karaf is also released independently and that allows us to use it
>> straight ahead.
>>
>>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

Re: [PROPOSAL] Convert OSGi integration test to pax-exam-karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Agree,

but it means that we have a "double" dependency:
- karaf 2.2.4 for itests + assembly
- karaf 3.0-SNAPSHOT for PaxExam

It's not a big deal.

Regards
JB

On 12/09/2011 11:57 AM, Ioannis Canellos wrote:
> To be honest I don't see what is the benefit of waiting for Karaf 3.0.0
> really is.
>
> pax-exam-karaf is also released independently and that allows us to use it
> straight ahead.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: [PROPOSAL] Convert OSGi integration test to pax-exam-karaf

Posted by Ioannis Canellos <io...@gmail.com>.
To be honest I don't see what is the benefit of waiting for Karaf 3.0.0
really is.

pax-exam-karaf is also released independently and that allows us to use it
straight ahead.

-- 
*Ioannis Canellos*
*
FuseSource <http://fusesource.com>

**
Blog: http://iocanel.blogspot.com
**
Apache Karaf <http://karaf.apache.org/> Committer & PMC
Apache Camel <http://camel.apache.org/> Committer
Apache ServiceMix <http://servicemix.apache.org/>  Committer
Apache Gora <http://incubator.apache.org/gora/> Committer
Apache DirectMemory <http://incubator.apache.org/directmemory/> Committer
*

Re: [PROPOSAL] Convert OSGi integration test to pax-exam-karaf

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Ioannis,

Agree with the proposed solution, but I will wait the update to Karaf 3.0.

The Karaf PaxExam is now part of the Karaf trunk (in tooling).

So we can switch to "Karaf PaxExam" when upgrading to Karaf 3.0.

Regards
JB

On 12/09/2011 11:02 AM, Ioannis Canellos wrote:
> Hi guys,
>
> I'd like to propose to convert our osgi integration tests from pax-exam 1.x
> to pax-exam-karaf (which uses pax-exam 2.x).
>
> *The problem*
> Our test are currently based on pax-exam 1.x. We build our test by creating
> a pseudo karaf instance over pax-exam by installing all the bundles we need.
> That is really cluttered and is really hard to maintain, since for every
> change in karafs dependencies we have to go all over the bundle list and
> see which artifacts were renamed, splitted or got new dependencies.
> That's a problem we have nearly every time we upgrade the karaf version
> inside the nmr.
>
> *The side effect*
> I think that this problem prevents us from adding more integration tests,
> since maintenance will become unbearable.
> But I do think that adding more tests is really needed. For example, we
> don't have a test that can tell us that our container even starts (not to
> say that bundle are started, or services are available).
>
> *The proposed solution*
> I propose to rewrite the integration tests based on
> https://github.com/openengsb/labs-paxexam-karaf.
> I have used this on several projects so far and it did really make a
> difference for me. I would say its the "selenium tests" for karaf.
>
> The value it brings to the table is that it allows you to run your tests
> directly inside your custom distribution (in our case directly in
> servicemix-nmr or servicemix distribution) and it save us the trouble of
> building it bundle by bundle.
> The tests run inside the real distribution with all its features available
> (from deployers and managed service factories to admin features).
>
> wdyt?
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com