You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Nuwan Jayawardene <ns...@gmail.com> on 2022/01/03 15:13:42 UTC

Unable to get to debug points in unit tests when debugging at build time

Hi all,
I'm currently working on writing unit tests in the
AddressEndpointSerializationTest class, which are meant to test out some
functionality I've implemented on the AddressEndpointFactory class.

I've been running the mvn clean install -Dmaven.surefire.debug command and
running a remote debugger on IntelliJ configured to port 5005 as per the
documentation.
However, while the debugger connects and disconnects multiple times, it
doesn't seem to 'hit' the required debug point which I've currently placed
here
<https://github.com/n-jay/synapse/blob/3688230dc367d44bb9b187fa6505be3159f9630d/modules/core/src/test/java/org/apache/synapse/config/xml/endpoints/AddressEndpointSerializationTest.java#L99>
.

I'm not sure if I need to keep on clicking the debug icon on IntelliJ until
it hits (which takes a significantly long time), or if I'm doing something
wrong.

Kind regards
-- 
*Nuwan Jayawardene*
Assistant Lecturer, Informatics Institute of Technology (IIT).
Research Assistant, University of Moratuwa

https://www.linkedin.com/m/in/nuwanjaya

Re: Unable to get to debug points in unit tests when debugging at build time

Posted by Nuwan Jayawardene <ns...@gmail.com>.
Noted Vanji,
Ravi actually suggested that I attempt using the -Dtest switch in maven, so
I'm currently attempting that.
Will update this thread moving forward.

Thanks and regards

On Tue, Jan 11, 2022 at 8:05 AM Vanjikumaran Sivajothy <
vanjikumaran@gmail.com> wrote:

> I would recommend debugging it isolatedly.
>
> On Mon, Jan 3, 2022 at 7:14 AM Nuwan Jayawardene <ns...@gmail.com>
> wrote:
>
>> Hi all,
>> I'm currently working on writing unit tests in the
>> AddressEndpointSerializationTest class, which are meant to test out some
>> functionality I've implemented on the AddressEndpointFactory class.
>>
>> I've been running the mvn clean install -Dmaven.surefire.debug command
>> and running a remote debugger on IntelliJ configured to port 5005 as per
>> the documentation.
>> However, while the debugger connects and disconnects multiple times, it
>> doesn't seem to 'hit' the required debug point which I've currently placed
>> here
>> <https://github.com/n-jay/synapse/blob/3688230dc367d44bb9b187fa6505be3159f9630d/modules/core/src/test/java/org/apache/synapse/config/xml/endpoints/AddressEndpointSerializationTest.java#L99>
>> .
>>
>> I'm not sure if I need to keep on clicking the debug icon on IntelliJ
>> until it hits (which takes a significantly long time), or if I'm doing
>> something wrong.
>>
>> Kind regards
>> --
>> *Nuwan Jayawardene*
>> Assistant Lecturer, Informatics Institute of Technology (IIT).
>> Research Assistant, University of Moratuwa
>>
>> https://www.linkedin.com/m/in/nuwanjaya
>>
>>
>>
>
> --
> Best Regards,
> Vanji
>


-- 
*Nuwan Jayawardene*
Assistant Lecturer, Informatics Institute of Technology (IIT).
Research Assistant, University of Moratuwa

https://www.linkedin.com/m/in/nuwanjaya

Re: Unable to get to debug points in unit tests when debugging at build time

Posted by Vanjikumaran Sivajothy <va...@gmail.com>.
I would recommend debugging it isolatedly.

On Mon, Jan 3, 2022 at 7:14 AM Nuwan Jayawardene <ns...@gmail.com> wrote:

> Hi all,
> I'm currently working on writing unit tests in the
> AddressEndpointSerializationTest class, which are meant to test out some
> functionality I've implemented on the AddressEndpointFactory class.
>
> I've been running the mvn clean install -Dmaven.surefire.debug command
> and running a remote debugger on IntelliJ configured to port 5005 as per
> the documentation.
> However, while the debugger connects and disconnects multiple times, it
> doesn't seem to 'hit' the required debug point which I've currently placed
> here
> <https://github.com/n-jay/synapse/blob/3688230dc367d44bb9b187fa6505be3159f9630d/modules/core/src/test/java/org/apache/synapse/config/xml/endpoints/AddressEndpointSerializationTest.java#L99>
> .
>
> I'm not sure if I need to keep on clicking the debug icon on IntelliJ
> until it hits (which takes a significantly long time), or if I'm doing
> something wrong.
>
> Kind regards
> --
> *Nuwan Jayawardene*
> Assistant Lecturer, Informatics Institute of Technology (IIT).
> Research Assistant, University of Moratuwa
>
> https://www.linkedin.com/m/in/nuwanjaya
>
>
>

-- 
Best Regards,
Vanji