You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by Filippo Balicchia <fb...@gmail.com> on 2012/11/14 21:33:25 UTC

debug karaf itests

Hi,

I'd like to debug karaf itests from eclipse, and i try with

-> export KARAF_DEBUG = true
-> mvnDebug test

but nothing...

To do this I have add KarafDistributionOption.debugConfiguration to
KarafTestContainer.

I don't use static import cause was a simple test

+++ tooling/exam/container/src/main/java/org/apache/karaf/tooling/exam/container/internal/KarafTestContainer.java
@@ -101,7 +101,8 @@
                             systemProperty(RMI_NAME_PROPERTY).value(name),
                             invokerConfiguration,
                             systemProperty(EXAM_INJECT_PROPERTY).value("true"),
-
editConfigurationFileExtend("etc/system.properties",
"jline.shutdownhook", "true")
+
editConfigurationFileExtend("etc/system.properties",
"jline.shutdownhook", "true"),
+                            KarafDistributionOption.debugConfiguration()
                     ));
             target = new RBCRemoteTarget(name, registry.getPort(),
subsystem.getTimeout());



with this change i can debug it from eclipse but
Could you tell me please if there is a smarter or a better way ?

Thanks for help

Regards

--Filippo

Re: debug karaf itests

Posted by Filippo Balicchia <fb...@gmail.com>.
Hey Andreas,

thanks for the response and sorry for delay .
there is no particular reason why add
KarafDistributionOption.debugConfiguration to KarafTestContainer.

I add it cause want to dig in all test to improve my karaf knowledge. ;-)

Regards

--Filippo

2012/11/16 Andreas Pieber <an...@gmail.com>:
> Hey Filippo,
>
> Why do you add the KarafDistributionOption.debugConfiguration directly
> to the exam KarafTestContainer? It would be enough adding the Option
> to your own configuration. I'm not sure what I'm missing?
>
> Kind regards,
> Andreas
>
> On Fri, Nov 16, 2012 at 6:25 AM, Andreas Pieber <an...@gmail.com> wrote:
>> Hey Filippo,
>>
>> I'm not
>>
>> On Wed, Nov 14, 2012 at 9:33 PM, Filippo Balicchia <fb...@gmail.com> wrote:
>>> Hi,
>>>
>>> I'd like to debug karaf itests from eclipse, and i try with
>>>
>>> -> export KARAF_DEBUG = true
>>> -> mvnDebug test
>>>
>>> but nothing...
>>>
>>> To do this I have add KarafDistributionOption.debugConfiguration to
>>> KarafTestContainer.
>>>
>>> I don't use static import cause was a simple test
>>>
>>> +++ tooling/exam/container/src/main/java/org/apache/karaf/tooling/exam/container/internal/KarafTestContainer.java
>>> @@ -101,7 +101,8 @@
>>>                              systemProperty(RMI_NAME_PROPERTY).value(name),
>>>                              invokerConfiguration,
>>>                              systemProperty(EXAM_INJECT_PROPERTY).value("true"),
>>> -
>>> editConfigurationFileExtend("etc/system.properties",
>>> "jline.shutdownhook", "true")
>>> +
>>> editConfigurationFileExtend("etc/system.properties",
>>> "jline.shutdownhook", "true"),
>>> +                            KarafDistributionOption.debugConfiguration()
>>>                      ));
>>>              target = new RBCRemoteTarget(name, registry.getPort(),
>>> subsystem.getTimeout());
>>>
>>>
>>>
>>> with this change i can debug it from eclipse but
>>> Could you tell me please if there is a smarter or a better way ?
>>>
>>> Thanks for help
>>>
>>> Regards
>>>
>>> --Filippo

Re: debug karaf itests

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

Why do you add the KarafDistributionOption.debugConfiguration directly
to the exam KarafTestContainer? It would be enough adding the Option
to your own configuration. I'm not sure what I'm missing?

Kind regards,
Andreas

On Fri, Nov 16, 2012 at 6:25 AM, Andreas Pieber <an...@gmail.com> wrote:
> Hey Filippo,
>
> I'm not
>
> On Wed, Nov 14, 2012 at 9:33 PM, Filippo Balicchia <fb...@gmail.com> wrote:
>> Hi,
>>
>> I'd like to debug karaf itests from eclipse, and i try with
>>
>> -> export KARAF_DEBUG = true
>> -> mvnDebug test
>>
>> but nothing...
>>
>> To do this I have add KarafDistributionOption.debugConfiguration to
>> KarafTestContainer.
>>
>> I don't use static import cause was a simple test
>>
>> +++ tooling/exam/container/src/main/java/org/apache/karaf/tooling/exam/container/internal/KarafTestContainer.java
>> @@ -101,7 +101,8 @@
>>                              systemProperty(RMI_NAME_PROPERTY).value(name),
>>                              invokerConfiguration,
>>                              systemProperty(EXAM_INJECT_PROPERTY).value("true"),
>> -
>> editConfigurationFileExtend("etc/system.properties",
>> "jline.shutdownhook", "true")
>> +
>> editConfigurationFileExtend("etc/system.properties",
>> "jline.shutdownhook", "true"),
>> +                            KarafDistributionOption.debugConfiguration()
>>                      ));
>>              target = new RBCRemoteTarget(name, registry.getPort(),
>> subsystem.getTimeout());
>>
>>
>>
>> with this change i can debug it from eclipse but
>> Could you tell me please if there is a smarter or a better way ?
>>
>> Thanks for help
>>
>> Regards
>>
>> --Filippo

Re: debug karaf itests

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

I'm not

On Wed, Nov 14, 2012 at 9:33 PM, Filippo Balicchia <fb...@gmail.com> wrote:
> Hi,
>
> I'd like to debug karaf itests from eclipse, and i try with
>
> -> export KARAF_DEBUG = true
> -> mvnDebug test
>
> but nothing...
>
> To do this I have add KarafDistributionOption.debugConfiguration to
> KarafTestContainer.
>
> I don't use static import cause was a simple test
>
> +++ tooling/exam/container/src/main/java/org/apache/karaf/tooling/exam/container/internal/KarafTestContainer.java
> @@ -101,7 +101,8 @@
>                              systemProperty(RMI_NAME_PROPERTY).value(name),
>                              invokerConfiguration,
>                              systemProperty(EXAM_INJECT_PROPERTY).value("true"),
> -
> editConfigurationFileExtend("etc/system.properties",
> "jline.shutdownhook", "true")
> +
> editConfigurationFileExtend("etc/system.properties",
> "jline.shutdownhook", "true"),
> +                            KarafDistributionOption.debugConfiguration()
>                      ));
>              target = new RBCRemoteTarget(name, registry.getPort(),
> subsystem.getTimeout());
>
>
>
> with this change i can debug it from eclipse but
> Could you tell me please if there is a smarter or a better way ?
>
> Thanks for help
>
> Regards
>
> --Filippo