Hi, On Wed, Jul 13, 2011 at 1:42 AM, Amila Manoj Silva (JIRA) <[email protected]>wrote:
> > [ > https://issues.apache.org/jira/browse/SYNAPSE-746?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel] > > Amila Manoj Silva updated SYNAPSE-746: > -------------------------------------- > > Attachment: samples_repo_dirs_patch_2.zip > gsoc_sample_automation_2.patch > This patch includes all the work done so far. As of now, following samples are automated: Message mediation samples - 0,1,2,3,4,5,6,7,8,9,10,11,12,13,15,16 Advanced mediation with endpoints - 50,51,52,53,54,55,56,57,58,59 ProxyService samples - 150,151,152,153,154,155 Most notable change from the previous patch is ability to start multiple axis2 servers on specified ports. Changed the sample descriptor file structure to meet this requirement. Specified ports are set during startup by Axis2BackEndServerController. A descriptor file for a sample that requires 3 axis2 servers running is as follows, <synapseSample> <sampleID>52</sampleID> <sampleName>Session-less load balancing between 3 endpoints</sampleName> <synapseConfig> <axis2Repo>repository</axis2Repo> <axis2Xml>repository/samples/synapseConfigs/synapseAxis2/axis2_0.xml</axis2Xml> <synapseXml>repository/samples/synapseConfigs/synapse_sample_52.xml</synapseXml> </synapseConfig> <axis2Config> <axis2Server id='1'> <axis2Repo>repository/samples/axis2Configs</axis2Repo> <axis2Xml>repository/samples/axis2Configs/axis2_0.xml</axis2Xml> <httpPort>9001</httpPort> <httpsPort>9005</httpsPort> </axis2Server> <axis2Server id='2'> <axis2Repo>repository/samples/axis2Configs</axis2Repo> <axis2Xml>repository/samples/axis2Configs/axis2_0.xml</axis2Xml> <httpPort>9002</httpPort> <httpsPort>9006</httpsPort> </axis2Server> <axis2Server id='3'> <axis2Repo>repository/samples/axis2Configs</axis2Repo> <axis2Xml>repository/samples/axis2Configs/axis2_0.xml</axis2Xml> <httpPort>9003</httpPort> <httpsPort>9007</httpsPort> </axis2Server> </axis2Config> <clientConfig> <clientRepo>repository/samples/client_repo</clientRepo> </clientConfig> </synapseSample> The directory structure for samples repository is basically the same. Added a temp directory. Several Endpoint samples(eg.55) requires shutting down an axis2 service while the client is running. For that purpose, executed the client in a separate thread. Some samples require client execution to fail and get an exception. Checked exception type and matched the description of the received exception is those cases. Setting a name for a Axis2 server is needed in certain examples, to see which response came from which server. In current implementation, this is done by setting a system property from ant script, retrieving it by the LB service and creating the response. But here, since all servers are run in a single process, system properties get replaced. As a solution to this, I set a property "server_name" in ConfigurationContext when starting axis2 server. Modified LBService1 to read the value and create the response. (attached zip file includes the modified LBService) Had some trouble with getting Sample 57 to work. Entry for clustering configuration in axis2.xml for synapse is written as: <cluster class="org.apache.axis2.clustering.tribes.TribesClusterManager" enable="false"> When it is enabled, during startup, synapse does not identify the tag name "cluster", but changing it to "clustering" works. There is no class named TribesClusterManager at org.apache.axis2.clustering.tribes in provided axis2 lib. Had to change it to TribesClusteringAgent. (Posted this separately to dev list) <loadBalancer enable="true"> <applicationDomain name="apache.axis2.app.domain" handler="org.apache.axis2.clustering.DefaultLoadBalanceEventHandler"/> </loadBalancer>--> isn't also identified. Had to change this to <groupManagement enable="true"> <applicationDomain agent="org.apache.axis2.clustering.management.DefaultGroupManagementAgent" description="Axis2 group" name="apache.axis2.app.domain"/> </groupManagement> In order for clustering to work, we have to provide the ip address. Since this differs, put a placeholder ${replace.me} for respective locations in axis2.xml. when test initialize stage, programatically obtained an ip (avoided loopback interfaces, gave preference to ipv4), loaded the xml and did a string replace, saved to repository/temp and used it to start synapse (similarly axis2 servers) Was able to automate this sample. However, this seems to fail sometimes randomly. Going to look into that. In addition, briefly tried WS-Security samples. Got a MethodNotFoundException from org.apache.neethi.Policy Next immediate step is to complete QoS samples. Then hope to move into transport samples. > > Hi, > > Attached the second patch. > Please find the description in the relevant thread at Dev ML. > > Thanks, > Amila > > > Implement an Automation Framework for Synapse Samples > > ----------------------------------------------------- > > > > Key: SYNAPSE-746 > > URL: https://issues.apache.org/jira/browse/SYNAPSE-746 > > Project: Synapse > > Issue Type: New Feature > > Components: Core, Documentation > > Reporter: Hiranya Jayathilaka > > Labels: gsoc2011 > > Fix For: FUTURE > > > > Attachments: gsoc_sample_automation_1.patch, > gsoc_sample_automation_2.patch, samples_repo_dirs.zip, > samples_repo_dirs_patch_2.zip > > > > > > Currently we have to manually setup and run all the Synapse samples. This > is a very tedious and time consuming process. We need an automation > framework which can handle all these for the developers. This should be able > to run a single sample, a selected set of samples and all the samples as > requested by the user. The framework should be capable of setting up the > environment, running the sample and verifying the results and preferably > generate a report as well. JUnit, Apache ANT or Maven2 can be used for > automating certain elements of this. > > -- > This message is automatically generated by JIRA. > For more information on JIRA, see: http://www.atlassian.com/software/jira > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > -- Regards, Amila Manoj
