@Harsha - Thanks for the input. I have one more doubt. Why would a high
frequency of API creation cause errors? Since APIM should be able to handle
multiple create requests in parallel, it should not be a problem right?
Please correct me if I'm wrong.
However, I ran only that particular test case after removing that line and
it seems to be working fine. I will run the whole test integration module
and verify.

Thanks & Regards,
Mushthaq

On Sat, Nov 18, 2017 at 7:11 PM, Harsha Kumara <hars...@wso2.com> wrote:

>
>
> On Sat, Nov 18, 2017 at 6:50 PM, Prasanna Dangalla <prasa...@wso2.com>
> wrote:
>
>> HI Rumy,
>>
>> In this code, it creates the API and then does a getAPI call as well.
>> Then changing the lifecycle state as well. After changing the lifecycle
>> state is does a verification as well. After all these only this
>> Thread.sleep is done. Hence IMO we can remove this Thread.sleep.
>>
> Yes we should be able to remove it. I believe this isn't going with a path
> which uses indexed API to retrived. But sometimes we noticed calling the
> API creation APIs in high frequency can cause errors. So it's better to do
> a few test rounds after you remove it and confirm. My doubt is, there might
> be a reason for those delays. It mostly the calling frequency. Anyway let's
> check and verify.
>
>>
>> Thanks
>> Prasanna
>>
>> *Prasanna Dangalla*
>> Senior Software Engineer, WSO2, Inc.; http://wso2.com/
>> lean.enterprise.middleware
>>
>>
>> *cell: +94 718 11 27 51*
>> *twitter: @prasa77*
>>
>> On Sat, Nov 18, 2017 at 1:36 PM, Mushthaq Rumy <musht...@wso2.com> wrote:
>>
>>> Hi All,
>>>
>>> While optimizing the APIM product build, I found a Thread.sleep() at
>>> [1]. Any particular reason for adding this. IMO we would not be needing
>>> this since this does not wait for any response rather it just waits before
>>> creating the next API. If there is no such specific reason, shall we remove
>>> this? WDYT?
>>>
>>> [1] - https://github.com/mushthaq33/product-apim/blob/468ab801a411
>>> 2d40c3a7bbddfcb7db21eae5a998/modules/integration/tests-integ
>>> ration/tests-backend/src/test/java/org/wso2/am/integration/
>>> tests/other/APIM710AllSubscriptionsByApplicationTestCase.java#L165
>>>
>>> --
>>> Mushthaq Rumy
>>> *Software Engineer*
>>> Mobile : +94 (0) 779 492140 <%2B94%20%280%29%20773%20451194>
>>> Email : musht...@wso2.com
>>> WSO2, Inc.; http://wso2.com/
>>> lean . enterprise . middleware.
>>>
>>> <http://wso2.com/signature>
>>>
>>
>>
>> _______________________________________________
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> Harsha Kumara
> Software Engineer, WSO2 Inc.
> Mobile: +94775505618 <+94%2077%20550%205618>
> Blog:harshcreationz.blogspot.com
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Mushthaq Rumy
*Software Engineer*
Mobile : +94 (0) 779 492140 <%2B94%20%280%29%20773%20451194>
Email : musht...@wso2.com
WSO2, Inc.; http://wso2.com/
lean . enterprise . middleware.

<http://wso2.com/signature>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to