Hi Shankar,

We wait for 5 min(by looping till 5 min) to let the server port open. if
the server failed to open the port within 5 min, We failed the test case or
skip all the tests. However 30 sec may be not enough for server to close
the port when restart, if it fail, Test case will be failed and we have to
kill the server after test and it will be tough since the server is not
starting properly. So better to wait for 2 min after we called restart and
let the server to close the port.

Thanks,
Nuwanw

On Fri, Sep 11, 2015 at 3:55 PM, Selvaratnam Uthaiyashankar <
shan...@wso2.com> wrote:

> sorry I misunderstood your comment previously.. Yes, what you have done is
> correct, but my thinking is, what will happen if the port is not closed
> within 30 seconds? Do we fail the test case? Same for the check on port
> open. If it didn't open within 15 seconds, do we fail the test case?
>
> On Fri, Sep 11, 2015 at 3:50 PM, Niranjan Karunanandham <niran...@wso2.com
> > wrote:
>
>> Hi Shankar,
>>
>> In the code currently we are looping to check if the port is close. If
>> the port does not close within 30 seconds then there should be an issue
>> (please correct me if am wrong). Then we wait for 15 seconds and then check
>> if the port is open (using the waitForPort provided by the automation
>> framework). This is to check if the server has successfully started again.
>>
>> Regards,
>> Nira
>>
>> On Fri, Sep 11, 2015 at 3:43 PM, Selvaratnam Uthaiyashankar <
>> shan...@wso2.com> wrote:
>>
>>> Even waiting for 30 seconds might not work. Can we loop with a sleep and
>>> see whether the process is not there and proceed? Port will be closed
>>> immediately, but the process might still run AFAIK.
>>>
>>> On Fri, Sep 11, 2015 at 3:41 PM, Selvaratnam Uthaiyashankar <
>>> shan...@wso2.com> wrote:
>>>
>>>> See, there are nothing called intermittent issue. Just wrong way of
>>>> doing stuff :)
>>>>
>>>> On Fri, Sep 11, 2015 at 3:36 PM, Niranjan Karunanandham <
>>>> niran...@wso2.com> wrote:
>>>>
>>>>> Hi Shankar,
>>>>>
>>>>> I went through the log and noticed that in the ServerRestartTestCase,
>>>>> it sends a command to restart the server and waits for 15 seconds and
>>>>> proceeds. If in case the server takes longer time then there is an issue.
>>>>> Therefore I added the check to wait for the http port to be closed (or 
>>>>> wait
>>>>> for 30 seconds - This is for the server to shutdown) and then use the util
>>>>> provided by the automation team to check if the port it open (this is to
>>>>> check if the port is open). Thanks Nuwan for the help.
>>>>>
>>>>> Regards,
>>>>> Nira
>>>>>
>>>>> On Fri, Sep 11, 2015 at 10:49 AM, Selvaratnam Uthaiyashankar <
>>>>> shan...@wso2.com> wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Sep 11, 2015 at 10:38 AM, Niranjan Karunanandham <
>>>>>> niran...@wso2.com> wrote:
>>>>>>
>>>>>>> Hi Shankar,
>>>>>>>
>>>>>>> It seems to be another server was accessing the h2 database.
>>>>>>>
>>>>>>
>>>>>>
>>>>>> How it is possible? It can't be intermittent.. May be we are shutting
>>>>>> down / killing the server in one test case and without waiting for the
>>>>>> server to stop fully, starting the server in another test case. So,
>>>>>> depending on the time, sometime it will work and sometime it will not 
>>>>>> work.
>>>>>> Is that the case?
>>>>>>
>>>>>>
>>>>>>
>>>>>>> I am looking into the CarbonTestServerManager class which is used to
>>>>>>> start the servers.
>>>>>>>
>>>>>>> Regards,
>>>>>>> Nira
>>>>>>>
>>>>>>> On Fri, Sep 11, 2015 at 10:36 AM, Selvaratnam Uthaiyashankar <
>>>>>>> shan...@wso2.com> wrote:
>>>>>>>
>>>>>>>> Folks, intermittent issues are the serious problem. We can't just
>>>>>>>> leave it with intermittent issues. Please track and see what was the 
>>>>>>>> cause?
>>>>>>>> database locked by another process means, two servers are running at 
>>>>>>>> the
>>>>>>>> same time?
>>>>>>>>
>>>>>>>> On Fri, Sep 11, 2015 at 10:14 AM, Niranjan Karunanandham <
>>>>>>>> niran...@wso2.com> wrote:
>>>>>>>>
>>>>>>>>> Hi all,
>>>>>>>>>
>>>>>>>>> I was able to build the Kernel 4.4.x branch successfully. As Supun
>>>>>>>>> mentioned this looks like an intermittent issue. I will look into
>>>>>>>>> this further and update this thread.
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>> Nira
>>>>>>>>>
>>>>>>>>> On Fri, Sep 11, 2015 at 9:28 AM, Niranjan Karunanandham <
>>>>>>>>> niran...@wso2.com> wrote:
>>>>>>>>>
>>>>>>>>>> Hi Supun,
>>>>>>>>>>
>>>>>>>>>> I will look into this. Just now triggered a build in openstack.
>>>>>>>>>>
>>>>>>>>>> Regards,
>>>>>>>>>> Nira
>>>>>>>>>>
>>>>>>>>>> On Fri, Sep 11, 2015 at 8:33 AM, Supun Malinga <sup...@wso2.com>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> org.wso2.carbon.integration.tests.integration.ServerShutdownTestCase.testGracefulServerShutdown
>>>>>>>>>>> test method fails saying below,
>>>>>>>>>>>
>>>>>>>>>>> Aruna/ Niranjan can one of you have a look ? This is 4.4.x
>>>>>>>>>>> branch.
>>>>>>>>>>> fyi, I built 4.4.x last night with all tests and build passed
>>>>>>>>>>> for me. May be this is intermittent.
>>>>>>>>>>>
>>>>>>>>>>> INFO  
>>>>>>>>>>> [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
>>>>>>>>>>>  - [2015-09-11 02:04:44,020] FATAL 
>>>>>>>>>>> {org.wso2.carbon.utils.dbcreator.DatabaseCreator} -  Failed to 
>>>>>>>>>>> create database tables for registry resource store. Database may be 
>>>>>>>>>>> already in use: "Locked by another process". Possible solutions: 
>>>>>>>>>>> close all other connection(s); use the server mode; SQL 
>>>>>>>>>>> statement:_null/14fba259c68182ad8201c93136703b5cf1b9e6fb09b 
>>>>>>>>>>> [90020-140] (Sanitized)
>>>>>>>>>>> INFO  
>>>>>>>>>>> [org.wso2.carbon.automation.extensions.servers.utils.ServerLogReader]
>>>>>>>>>>>  - org.h2.jdbc.JdbcSQLException: Database may be already in use: 
>>>>>>>>>>> "Locked by another process". Possible solutions: close all other 
>>>>>>>>>>> connection(s); use the server mode; SQL statement:
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> https://wso2.org/jenkins/job/carbon4-kernel_4.4.x/org.wso2.carbon$org.wso2.carbon.kernel.integration.test/48/testReport/
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On Fri, Sep 11, 2015 at 7:47 AM, <cbuil...@wso2.org> wrote:
>>>>>>>>>>>
>>>>>>>>>>>> See <
>>>>>>>>>>>> https://wso2.org/jenkins/job/carbon4-kernel_4.4.x/48/changes>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> --
>>>>>>>>>>> Supun Malinga,
>>>>>>>>>>>
>>>>>>>>>>> Senior Software Engineer,
>>>>>>>>>>> WSO2 Inc.
>>>>>>>>>>> http://wso2.com
>>>>>>>>>>> email: sup...@wso2.com <sup...@wso2.com>
>>>>>>>>>>> mobile: +94 (0)71 56 91 321
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>>
>>>>>>>>>> *Niranjan Karunanandham*
>>>>>>>>>> Senior Software Engineer - WSO2 Inc.
>>>>>>>>>> WSO2 Inc.: http://www.wso2.com
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>>
>>>>>>>>> *Niranjan Karunanandham*
>>>>>>>>> Senior Software Engineer - WSO2 Inc.
>>>>>>>>> WSO2 Inc.: http://www.wso2.com
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> Dev mailing list
>>>>>>>>> Dev@wso2.org
>>>>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> S.Uthaiyashankar
>>>>>>>> VP Engineering
>>>>>>>> WSO2 Inc.
>>>>>>>> http://wso2.com/ - "lean . enterprise . middleware"
>>>>>>>>
>>>>>>>> Phone: +94 714897591
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> *Niranjan Karunanandham*
>>>>>>> Senior Software Engineer - WSO2 Inc.
>>>>>>> WSO2 Inc.: http://www.wso2.com
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> S.Uthaiyashankar
>>>>>> VP Engineering
>>>>>> WSO2 Inc.
>>>>>> http://wso2.com/ - "lean . enterprise . middleware"
>>>>>>
>>>>>> Phone: +94 714897591
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> *Niranjan Karunanandham*
>>>>> Senior Software Engineer - WSO2 Inc.
>>>>> WSO2 Inc.: http://www.wso2.com
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> S.Uthaiyashankar
>>>> VP Engineering
>>>> WSO2 Inc.
>>>> http://wso2.com/ - "lean . enterprise . middleware"
>>>>
>>>> Phone: +94 714897591
>>>>
>>>
>>>
>>>
>>> --
>>> S.Uthaiyashankar
>>> VP Engineering
>>> WSO2 Inc.
>>> http://wso2.com/ - "lean . enterprise . middleware"
>>>
>>> Phone: +94 714897591
>>>
>>
>>
>>
>> --
>>
>> *Niranjan Karunanandham*
>> Senior Software Engineer - WSO2 Inc.
>> WSO2 Inc.: http://www.wso2.com
>>
>
>
>
> --
> S.Uthaiyashankar
> VP Engineering
> WSO2 Inc.
> http://wso2.com/ - "lean . enterprise . middleware"
>
> Phone: +94 714897591
>



-- 
Nuwan Wimalasekara
Senior Software Engineer - Test Automation
WSO2, Inc.: http://wso2.com
lean. enterprise. middleware

phone: +94 71 668 4620
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to