@Thusitha / @Saneth : Thank you guys for the help, able to apply the configuration as you explained.
@Niranjan : I will send the PR with integration tests to master branch. Thanks, Madhawa On Sat, Jun 6, 2015 at 6:10 PM, Niranjan Karunanandham <[email protected]> wrote: > Hi Madhawa, > > If you are sending fixes to the snapshot (master branch) version in [1], > then you need to write the integration test to carbon4-kernel [2] since > only carbon4-kernel will be pointing to the master branch of axis2(snapshot > version) whereas DSS will be only pointing to released version of axis2. > > [1] - https://github.com/wso2/wso2-axis2 > [2] - https://github.com/wso2/carbon4-kernel > > Regards, > Nira > > > On Sat, Jun 6, 2015 at 5:39 PM, Saneth Dharmakeerthi <[email protected]> > wrote: > >> Hi Madhawa, >> >> You can use ServerConfigurationManager.applyConfiguration(File sourceFile, >> File targetFile, boolean backupConfigFile, boolean restartServer) to do this >> task. If you pass backupConfigFile as true it will backup the configuration >> and using restoreToLastConfiguration() method you can revert to the original >> file. >> >> Sample code is available at [1]. Instead of BeforeTest you can add the >> configurations in BeforeClass and instead of AfterTest you can restore the >> configurations at AfterClass. >> >> >> [1]https://github.com/wso2/product-apim/blob/master/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/lifecycle/APIManagerConfigurationChangeTest.java >> >> >> Thanks and Best Regards, >> >> Saneth Dharmakeerthi >> Senior Software Engineer >> WSO2, Inc. >> Mobile: +94772325511 >> >> On Sat, Jun 6, 2015 at 11:12 AM, Thusitha Thilina Dayaratne < >> [email protected]> wrote: >> >>> Hi Madhawa, >>> >>> I wrote a TestCase for ESB and in there we can set like below. Hope this >>> will help you to get some idea :) >>> >>> private ServerConfigurationManager configManager; >>>> @BeforeClass(alwaysRun = true) >>>> public void setEnvironment() throws Exception { >>>> ... >>>> File customAxisConfig = new File(path_to_axis2.xml); >>>> configManager = new ServerConfigurationManager( >>>> esbServer.getBackEndUrl()); >>>> configManager.applyConfiguration(customAxisConfig); >>>> ... >>>> } >>> >>> >>> Thanks >>> /Thusitha >>> >>> On Sat, Jun 6, 2015 at 8:43 AM, Madhawa Gunasekara <[email protected]> >>> wrote: >>> >>>> Hi All, >>>> >>>> I am writing a test case for DSS 3.2.2 to test the >>>> org.apache.axis2.json.JSONMessageFormatter (old json formatter) for >>>> some queries, In default configurations DSS3.2.2 uses >>>> org.apache.axis2.json.gson.JsonFormatter as json formatter. >>>> Therefore I think, I need to replace the axis.xml in test scope. How >>>> can I do it in DSS 3.2.2 ? >>>> >>>> Any help on this is highly appreciated. >>>> >>>> Thanks, >>>> Madhawa >>>> >>>> -- >>>> *Madhawa Gunasekara* >>>> Software Engineer >>>> WSO2 Inc.; http://wso2.com >>>> lean.enterprise.middleware >>>> >>>> mobile: +94 719411002 <+94+719411002> >>>> blog: *http://madhawa-gunasekara.blogspot.com >>>> <http://madhawa-gunasekara.blogspot.com>* >>>> linkedin: *http://lk.linkedin.com/in/mgunasekara >>>> <http://lk.linkedin.com/in/mgunasekara>* >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> [email protected] >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >>> >>> -- >>> Thusitha Dayaratne >>> Software Engineer >>> WSO2 Inc. - lean . enterprise . middleware | wso2.com >>> >>> Mobile +94712756809 >>> Blog alokayasoya.blogspot.com >>> About http://about.me/thusithathilina >>> >>> >>> _______________________________________________ >>> Dev mailing list >>> [email protected] >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> _______________________________________________ >> Dev mailing list >> [email protected] >> http://wso2.org/cgi-bin/mailman/listinfo/dev >> >> > > > -- > > *Niranjan Karunanandham* > Senior Software Engineer - WSO2 Inc. > WSO2 Inc.: http://www.wso2.com > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- *Madhawa Gunasekara* Software Engineer WSO2 Inc.; http://wso2.com lean.enterprise.middleware mobile: +94 719411002 <+94+719411002> blog: *http://madhawa-gunasekara.blogspot.com <http://madhawa-gunasekara.blogspot.com>* linkedin: *http://lk.linkedin.com/in/mgunasekara <http://lk.linkedin.com/in/mgunasekara>*
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
