Re: [Dev] [Siddhi] TestUtility to throw Assertion Errors from main thread

2017-09-15 Thread Sriskandarajah Suhothayan
No worries, thanks for the update!

Suho

On Sat, Sep 16, 2017 at 3:09 AM Gobinath  wrote:

> Hi,
>
> My last PR contains a check-style issue which causes to Sidhhi build
> failure. Please merge my new PR #526
>  which fixes the check-style
> issue and also includes your suggestion.
>
> Sorry for the check-style issue. I sent that PR just to make sure the
> design so I didn't check the style.
>
> Thanks & Regards,
> Gobinath
>
> On Fri, Sep 15, 2017 at 1:30 PM, Sriskandarajah Suhothayan 
> wrote:
>
>> Thanks for the improvement it looks good.
>> I have merged.
>>
>> But I think it should be called as Test*Callback *with a simple b.
>>
>> Can you fix that.
>>
>> Thanks
>> Suho
>>
>>
>> On Mon, Sep 4, 2017 at 5:18 PM, Gobinath  wrote:
>>
>>> Hi,
>>>
>>> As per my experience during my GSoC project, the assertion errors thrown
>>> by worker threads in the unit test callbacks do not interrupt the compiling
>>> process.
>>>
>>> I discussed with Suho during a code review and come up with a solution
>>> by storing the assertion errors in a java.util.List and throw them
>>> later in the main thread. I have sent a PR containing the prototype of my
>>> implementation and a sample application of it [1]. Could you please check
>>> the design, class name and the location.
>>>
>>> I am thinking about adding overloaded methods with Predicates as shown
>>> below but it can be used only in combined with Assert.assertTrue. WDYT?
>>>
>>> public static TestCallBack addQueryCallback(SiddhiAppRuntime
>>> siddhiAppRuntime, String queryName, Predicate... predicates) {
>>> // ...
>>> }
>>>
>>> [1] https://github.com/wso2/siddhi/pull/510
>>>
>>> PS: @Suho & @Nirmal please ignore my previous mail which has an
>>> incorrect dev mail address.
>>>
>>> Thanks & Regards,
>>> Gobinath
>>>
>>> --
>>> *Gobinath** Loganathan*
>>> Graduate Student,
>>> Electrical and Computer Engineering,
>>> Western University.
>>> Email  : slgobin...@gmail.com
>>> Blog: javahelps.com 
>>>
>>>
>>
>>
>>
>> --
>>
>> *S. Suhothayan*
>> Associate Director / Architect
>> *WSO2 Inc. *http://wso2.com
>> * *
>> lean . enterprise . middleware
>>
>>
>> *cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/
>> twitter: http://twitter.com/suhothayan
>>  | linked-in:
>> http://lk.linkedin.com/in/suhothayan *
>>
>
>
>
> --
> *Gobinath** Loganathan*
> Graduate Student,
> Electrical and Computer Engineering,
> Western University.
> Email  : slgobin...@gmail.com
> Blog: javahelps.com 
>
>
-- 

*S. Suhothayan*
Associate Director / Architect
*WSO2 Inc. *http://wso2.com
* *
lean . enterprise . middleware


*cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/
twitter: http://twitter.com/suhothayan
 | linked-in:
http://lk.linkedin.com/in/suhothayan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Siddhi] TestUtility to throw Assertion Errors from main thread

2017-09-15 Thread Gobinath
Hi,

My last PR contains a check-style issue which causes to Sidhhi build
failure. Please merge my new PR #526
 which fixes the check-style issue
and also includes your suggestion.

Sorry for the check-style issue. I sent that PR just to make sure the
design so I didn't check the style.

Thanks & Regards,
Gobinath

On Fri, Sep 15, 2017 at 1:30 PM, Sriskandarajah Suhothayan 
wrote:

> Thanks for the improvement it looks good.
> I have merged.
>
> But I think it should be called as Test*Callback *with a simple b.
>
> Can you fix that.
>
> Thanks
> Suho
>
>
> On Mon, Sep 4, 2017 at 5:18 PM, Gobinath  wrote:
>
>> Hi,
>>
>> As per my experience during my GSoC project, the assertion errors thrown
>> by worker threads in the unit test callbacks do not interrupt the compiling
>> process.
>>
>> I discussed with Suho during a code review and come up with a solution by
>> storing the assertion errors in a java.util.List and throw them later in
>> the main thread. I have sent a PR containing the prototype of my
>> implementation and a sample application of it [1]. Could you please check
>> the design, class name and the location.
>>
>> I am thinking about adding overloaded methods with Predicates as shown
>> below but it can be used only in combined with Assert.assertTrue. WDYT?
>>
>> public static TestCallBack addQueryCallback(SiddhiAppRuntime
>> siddhiAppRuntime, String queryName, Predicate... predicates) {
>> // ...
>> }
>>
>> [1] https://github.com/wso2/siddhi/pull/510
>>
>> PS: @Suho & @Nirmal please ignore my previous mail which has an incorrect
>> dev mail address.
>>
>> Thanks & Regards,
>> Gobinath
>>
>> --
>> *Gobinath** Loganathan*
>> Graduate Student,
>> Electrical and Computer Engineering,
>> Western University.
>> Email  : slgobin...@gmail.com
>> Blog: javahelps.com 
>>
>>
>
>
>
> --
>
> *S. Suhothayan*
> Associate Director / Architect
> *WSO2 Inc. *http://wso2.com
> * *
> lean . enterprise . middleware
>
>
> *cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/
> twitter: http://twitter.com/suhothayan
>  | linked-in:
> http://lk.linkedin.com/in/suhothayan *
>



-- 
*Gobinath** Loganathan*
Graduate Student,
Electrical and Computer Engineering,
Western University.
Email  : slgobin...@gmail.com
Blog: javahelps.com 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [Siddhi] TestUtility to throw Assertion Errors from main thread

2017-09-15 Thread Sriskandarajah Suhothayan
Thanks for the improvement it looks good.
I have merged.

But I think it should be called as Test*Callback *with a simple b.

Can you fix that.

Thanks
Suho


On Mon, Sep 4, 2017 at 5:18 PM, Gobinath  wrote:

> Hi,
>
> As per my experience during my GSoC project, the assertion errors thrown
> by worker threads in the unit test callbacks do not interrupt the compiling
> process.
>
> I discussed with Suho during a code review and come up with a solution by
> storing the assertion errors in a java.util.List and throw them later in
> the main thread. I have sent a PR containing the prototype of my
> implementation and a sample application of it [1]. Could you please check
> the design, class name and the location.
>
> I am thinking about adding overloaded methods with Predicates as shown
> below but it can be used only in combined with Assert.assertTrue. WDYT?
>
> public static TestCallBack addQueryCallback(SiddhiAppRuntime
> siddhiAppRuntime, String queryName, Predicate... predicates) {
> // ...
> }
>
> [1] https://github.com/wso2/siddhi/pull/510
>
> PS: @Suho & @Nirmal please ignore my previous mail which has an incorrect
> dev mail address.
>
> Thanks & Regards,
> Gobinath
>
> --
> *Gobinath** Loganathan*
> Graduate Student,
> Electrical and Computer Engineering,
> Western University.
> Email  : slgobin...@gmail.com
> Blog: javahelps.com 
>
>



-- 

*S. Suhothayan*
Associate Director / Architect
*WSO2 Inc. *http://wso2.com
* *
lean . enterprise . middleware


*cell: (+94) 779 756 757 | blog: http://suhothayan.blogspot.com/
twitter: http://twitter.com/suhothayan
 | linked-in:
http://lk.linkedin.com/in/suhothayan *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [Siddhi] TestUtility to throw Assertion Errors from main thread

2017-09-04 Thread Gobinath
Hi,

As per my experience during my GSoC project, the assertion errors thrown by
worker threads in the unit test callbacks do not interrupt the compiling
process.

I discussed with Suho during a code review and come up with a solution by
storing the assertion errors in a java.util.List and throw them later in
the main thread. I have sent a PR containing the prototype of my
implementation and a sample application of it [1]. Could you please check
the design, class name and the location.

I am thinking about adding overloaded methods with Predicates as shown
below but it can be used only in combined with Assert.assertTrue. WDYT?

public static TestCallBack addQueryCallback(SiddhiAppRuntime
siddhiAppRuntime, String queryName, Predicate... predicates) {
// ...
}

[1] https://github.com/wso2/siddhi/pull/510

PS: @Suho & @Nirmal please ignore my previous mail which has an incorrect
dev mail address.

Thanks & Regards,
Gobinath

-- 
*Gobinath** Loganathan*
Graduate Student,
Electrical and Computer Engineering,
Western University.
Email  : slgobin...@gmail.com
Blog: javahelps.com 
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev