You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Willem Jiang <wi...@gmail.com> on 2011/03/16 06:04:03 UTC

Karaf FeaturesTest of Karaf 2.2.x

Hi,

I'm trying to fix the unit test errors of Camel itest-osgi-karaf (which
is based on Pax-Exam) after Camel upgrade to Karaf 2.2.0.

I found due to the a huge changes on Karaf feature the Pax-Exam doesn't
support the karaf features any more. You can easily reproduce the
error by applying the below patch into Karaf 2.2.x branch.

diff --git 
a/itests/tests/src/test/java/org/apache/karaf/shell/itests/FeaturesTest.java 
b/itests/tes
index 074a29e..cb57b25 100644
--- 
a/itests/tests/src/test/java/org/apache/karaf/shell/itests/FeaturesTest.java
+++ 
b/itests/tests/src/test/java/org/apache/karaf/shell/itests/FeaturesTest.java
@@ -61,6 +61,7 @@ public class FeaturesTest extends 
AbstractIntegrationTest {

              // add two features
              Helper.loadKarafStandardFeatures("obr", "wrapper"),
+            Helper.loadKarafStandardFeatures("spring", "http"),

              workingDirectory("target/paxrunner/features/"),

According to the stack trace, it looks we need to update the Pax-Exam 
and Pax-Runner for this new feature.

Is there any other thing that I'm missing?

Thanks,

Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Re: Karaf FeaturesTest of Karaf 2.2.x

Posted by Willem Jiang <wi...@gmail.com>.
Hi Andreas,

Thanks for the information, I will check out what you changed to see if 
I can do the same thing in Camel.

Willem

On 3/16/11 6:45 PM, Andreas Pieber wrote:
> oook... Correction. The problem wasn't pax-exam 1.2.4 but rather that
> exam-1.2.4 requires runner 1.6.x. Since we didn't upgrade that dep the
> old version of pax-scanner was used changing nothing. I've upgraded
> pax-runner on 2.2.x and trunk now (KARAF-517). Can you please validate
> if it works for you now? (btw, I've applied your patch on 2.2.x branch
> and it worked for me now)
>
> Kind regards,
> Andreas
>
> On Wed, Mar 16, 2011 at 8:33 AM, Andreas Pieber<an...@gmail.com>  wrote:
>> mhm... spring works as expected. Http is the problem (although I'm not
>> sure y by the moment; researching....)
>>
>> kind regards,
>> Andreas
>>
>> On Wed, Mar 16, 2011 at 6:04 AM, Willem Jiang<wi...@gmail.com>  wrote:
>>> Hi,
>>>
>>> I'm trying to fix the unit test errors of Camel itest-osgi-karaf (which
>>> is based on Pax-Exam) after Camel upgrade to Karaf 2.2.0.
>>>
>>> I found due to the a huge changes on Karaf feature the Pax-Exam doesn't
>>> support the karaf features any more. You can easily reproduce the
>>> error by applying the below patch into Karaf 2.2.x branch.
>>>
>>> diff --git
>>> a/itests/tests/src/test/java/org/apache/karaf/shell/itests/FeaturesTest.java
>>> b/itests/tes
>>> index 074a29e..cb57b25 100644
>>> ---
>>> a/itests/tests/src/test/java/org/apache/karaf/shell/itests/FeaturesTest.java
>>> +++
>>> b/itests/tests/src/test/java/org/apache/karaf/shell/itests/FeaturesTest.java
>>> @@ -61,6 +61,7 @@ public class FeaturesTest extends AbstractIntegrationTest
>>> {
>>>
>>>              // add two features
>>>              Helper.loadKarafStandardFeatures("obr", "wrapper"),
>>> +            Helper.loadKarafStandardFeatures("spring", "http"),
>>>
>>>              workingDirectory("target/paxrunner/features/"),
>>>
>>> According to the stack trace, it looks we need to update the Pax-Exam and
>>> Pax-Runner for this new feature.
>>>
>>> Is there any other thing that I'm missing?
>>>
>>> Thanks,
>>>
>>> Willem
>>> ----------------------------------
>>> FuseSource
>>> Web: http://www.fusesource.com
>>> Blog:    http://willemjiang.blogspot.com (English)
>>>          http://jnn.javaeye.com (Chinese)
>>> Twitter: willemjiang
>>>
>>
>


-- 
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog:    http://willemjiang.blogspot.com (English)
          http://jnn.javaeye.com (Chinese)
Twitter: willemjiang

Re: Karaf FeaturesTest of Karaf 2.2.x

Posted by Andreas Pieber <an...@gmail.com>.
oook... Correction. The problem wasn't pax-exam 1.2.4 but rather that
exam-1.2.4 requires runner 1.6.x. Since we didn't upgrade that dep the
old version of pax-scanner was used changing nothing. I've upgraded
pax-runner on 2.2.x and trunk now (KARAF-517). Can you please validate
if it works for you now? (btw, I've applied your patch on 2.2.x branch
and it worked for me now)

Kind regards,
Andreas

On Wed, Mar 16, 2011 at 8:33 AM, Andreas Pieber <an...@gmail.com> wrote:
> mhm... spring works as expected. Http is the problem (although I'm not
> sure y by the moment; researching....)
>
> kind regards,
> Andreas
>
> On Wed, Mar 16, 2011 at 6:04 AM, Willem Jiang <wi...@gmail.com> wrote:
>> Hi,
>>
>> I'm trying to fix the unit test errors of Camel itest-osgi-karaf (which
>> is based on Pax-Exam) after Camel upgrade to Karaf 2.2.0.
>>
>> I found due to the a huge changes on Karaf feature the Pax-Exam doesn't
>> support the karaf features any more. You can easily reproduce the
>> error by applying the below patch into Karaf 2.2.x branch.
>>
>> diff --git
>> a/itests/tests/src/test/java/org/apache/karaf/shell/itests/FeaturesTest.java
>> b/itests/tes
>> index 074a29e..cb57b25 100644
>> ---
>> a/itests/tests/src/test/java/org/apache/karaf/shell/itests/FeaturesTest.java
>> +++
>> b/itests/tests/src/test/java/org/apache/karaf/shell/itests/FeaturesTest.java
>> @@ -61,6 +61,7 @@ public class FeaturesTest extends AbstractIntegrationTest
>> {
>>
>>             // add two features
>>             Helper.loadKarafStandardFeatures("obr", "wrapper"),
>> +            Helper.loadKarafStandardFeatures("spring", "http"),
>>
>>             workingDirectory("target/paxrunner/features/"),
>>
>> According to the stack trace, it looks we need to update the Pax-Exam and
>> Pax-Runner for this new feature.
>>
>> Is there any other thing that I'm missing?
>>
>> Thanks,
>>
>> Willem
>> ----------------------------------
>> FuseSource
>> Web: http://www.fusesource.com
>> Blog:    http://willemjiang.blogspot.com (English)
>>         http://jnn.javaeye.com (Chinese)
>> Twitter: willemjiang
>>
>

Re: Karaf FeaturesTest of Karaf 2.2.x

Posted by Andreas Pieber <an...@gmail.com>.
mhm... spring works as expected. Http is the problem (although I'm not
sure y by the moment; researching....)

kind regards,
Andreas

On Wed, Mar 16, 2011 at 6:04 AM, Willem Jiang <wi...@gmail.com> wrote:
> Hi,
>
> I'm trying to fix the unit test errors of Camel itest-osgi-karaf (which
> is based on Pax-Exam) after Camel upgrade to Karaf 2.2.0.
>
> I found due to the a huge changes on Karaf feature the Pax-Exam doesn't
> support the karaf features any more. You can easily reproduce the
> error by applying the below patch into Karaf 2.2.x branch.
>
> diff --git
> a/itests/tests/src/test/java/org/apache/karaf/shell/itests/FeaturesTest.java
> b/itests/tes
> index 074a29e..cb57b25 100644
> ---
> a/itests/tests/src/test/java/org/apache/karaf/shell/itests/FeaturesTest.java
> +++
> b/itests/tests/src/test/java/org/apache/karaf/shell/itests/FeaturesTest.java
> @@ -61,6 +61,7 @@ public class FeaturesTest extends AbstractIntegrationTest
> {
>
>             // add two features
>             Helper.loadKarafStandardFeatures("obr", "wrapper"),
> +            Helper.loadKarafStandardFeatures("spring", "http"),
>
>             workingDirectory("target/paxrunner/features/"),
>
> According to the stack trace, it looks we need to update the Pax-Exam and
> Pax-Runner for this new feature.
>
> Is there any other thing that I'm missing?
>
> Thanks,
>
> Willem
> ----------------------------------
> FuseSource
> Web: http://www.fusesource.com
> Blog:    http://willemjiang.blogspot.com (English)
>         http://jnn.javaeye.com (Chinese)
> Twitter: willemjiang
>