Re: [Dev] [TAF] Cleaning carbontmp after test execution

2015-06-19 Thread Saneth Dharmakeerthi
Hi Maheeka.

AFAIK It is not good idea to  implement deletion logic inside
serverShoudown method. Because in integration tests you can start multiple
carbon servers with port offsets. So if you call the serverShoudown() of
one carbon server(port offset) it will try to delete the distribution which
is still under test.

Thanks and Best Regards,

Saneth Dharmakeerthi
Senior Software Engineer
WSO2, Inc.
Mobile: +94772325511

On Fri, Jun 19, 2015 at 4:17 PM, Maheeka Jayasuriya mahe...@wso2.com
wrote:

 Hi,

 During each test execution a copy of ESB distribution is unzipped to
 target folder to run the tests against. The problem is that distribution
 gets copied per execution per module. Each of this is ~250MB and therefore,
 extremely space consuming.

 As per [1], we can add carbontmp folder deletion logic in serverShutdown
 method. Is there any particular reason to preserve them?

 [1]
 https://github.com/wso2/carbon-platform-integration/blob/master/test-automation-framework/org.wso2.carbon.automation.extensions/src/main/java/org/wso2/carbon/automation/extensions/servers/carbonserver/CarbonServerManager.java

 Thanks,

 Maheeka Jayasuriya
 Software Engineer
 Mobile : +9450661

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev


___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] [TAF] Cleaning carbontmp after test execution

2015-06-19 Thread Maheeka Jayasuriya
Hi,

During each test execution a copy of ESB distribution is unzipped to target
folder to run the tests against. The problem is that distribution gets
copied per execution per module. Each of this is ~250MB and therefore,
extremely space consuming.

As per [1], we can add carbontmp folder deletion logic in serverShutdown
method. Is there any particular reason to preserve them?

[1]
https://github.com/wso2/carbon-platform-integration/blob/master/test-automation-framework/org.wso2.carbon.automation.extensions/src/main/java/org/wso2/carbon/automation/extensions/servers/carbonserver/CarbonServerManager.java

Thanks,

Maheeka Jayasuriya
Software Engineer
Mobile : +9450661
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [TAF] Cleaning carbontmp after test execution

2015-06-19 Thread Krishantha Samaraweera
Hi Maheeka,

On Fri, Jun 19, 2015 at 4:17 PM, Maheeka Jayasuriya mahe...@wso2.com
wrote:

 Hi,

 During each test execution a copy of ESB distribution is unzipped to
 target folder to run the tests against. The problem is that distribution
 gets copied per execution per module. Each of this is ~250MB and therefore,
 extremely space consuming.

 As per [1], we can add carbontmp folder deletion logic in serverShutdown
 method. Is there any particular reason to preserve them?


Distribution is preserved for the purpose of debugging. You can delete the
distribution at end of tests if its not necessary. To delete the
distribution:

a. Use maven clearn-resource-plugin and configure it to run at the end of
tests. [1] may helps.
b. Write you own framework extension and clean distribution at the end of
each test module execution [recommended]

Thanks,
Krishantha.

[1]
http://stackoverflow.com/questions/2911676/delete-the-target-directory-after-build




 [1]
 https://github.com/wso2/carbon-platform-integration/blob/master/test-automation-framework/org.wso2.carbon.automation.extensions/src/main/java/org/wso2/carbon/automation/extensions/servers/carbonserver/CarbonServerManager.java

 Thanks,

 Maheeka Jayasuriya
 Software Engineer
 Mobile : +9450661

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




-- 
Krishantha Samaraweera
Senior Technical Lead - Test Automation
Mobile: +94 77 7759918
WSO2, Inc.; http://wso2.com/
lean . enterprise . middleware.
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] [TAF] Cleaning carbontmp after test execution

2015-06-19 Thread Maheeka Jayasuriya
Hi Saneth,

Isn't the above serverShutdown method called at the end of test execution,
as per CarbonServerExtension ?

I believe the flow is as :
CarbonServerExtension (ExecutionListenerExtension).onExecutionFinish() ==
TestServerManager.stopServer() == CarbonServerManager.
serverShutdown(portOffset)

If it is not, how else can we fix this concern?

Thanks,
Maheeka

Maheeka Jayasuriya
Software Engineer
Mobile : +9450661

On Fri, Jun 19, 2015 at 4:42 PM, Saneth Dharmakeerthi sane...@wso2.com
wrote:

 Hi Maheeka.

 AFAIK It is not good idea to  implement deletion logic inside
 serverShoudown method. Because in integration tests you can start multiple
 carbon servers with port offsets. So if you call the serverShoudown() of
 one carbon server(port offset) it will try to delete the distribution which
 is still under test.

 Thanks and Best Regards,

 Saneth Dharmakeerthi
 Senior Software Engineer
 WSO2, Inc.
 Mobile: +94772325511

 On Fri, Jun 19, 2015 at 4:17 PM, Maheeka Jayasuriya mahe...@wso2.com
 wrote:

 Hi,

 During each test execution a copy of ESB distribution is unzipped to
 target folder to run the tests against. The problem is that distribution
 gets copied per execution per module. Each of this is ~250MB and therefore,
 extremely space consuming.

 As per [1], we can add carbontmp folder deletion logic in serverShutdown
 method. Is there any particular reason to preserve them?

 [1]
 https://github.com/wso2/carbon-platform-integration/blob/master/test-automation-framework/org.wso2.carbon.automation.extensions/src/main/java/org/wso2/carbon/automation/extensions/servers/carbonserver/CarbonServerManager.java

 Thanks,

 Maheeka Jayasuriya
 Software Engineer
 Mobile : +9450661

 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev



___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev