Commit d5ff0193 authored by afreyssin's avatar afreyssin
Browse files

Tests the XML administration scripts.

parent 8de3adca
......@@ -51,6 +51,7 @@ import framework.TestCase;
* - Sends 1000 messages on a DistributionQueue
* - Stops the Joram bridge server, then restarts it.
* - Receives the messages through an AcquisitionQueue.
* Note: This test can either use the administration API or XML script.
*/
public class BridgeRestTest6 extends TestCase implements MessageListener {
public static void main(String[] args) {
......@@ -74,7 +75,11 @@ public class BridgeRestTest6 extends TestCase implements MessageListener {
startAgentServer1();
Thread.sleep(1000);
admin();
if (Boolean.getBoolean("useXML"))
AdminModule.executeXMLAdmin("joramAdmin.xml");
else
admin();
test();
} catch (Throwable exc) {
exc.printStackTrace();
......@@ -111,7 +116,7 @@ public class BridgeRestTest6 extends TestCase implements MessageListener {
// Create a REST acquisition queue on server.
Queue distQueue = new RestDistributionQueue()
.setHostName("localhost")
.setHost("localhost")
.setPort(8989)
.setPeriod(1000)
.setIdleTimeout(10)
......
<?xml version="1.0"?>
<!--
- Copyright (C) 2017 ScalAgent Distributed Technologies
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or any later version.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
- USA.
-->
<JoramAdmin>
<TcpAdminModule host="localhost" port="16010" name="root" password="root">
<property name="connectingTimer" value="60"/>
</TcpAdminModule>
<InitialContext>
<property name="java.naming.factory.initial"
value="fr.dyade.aaa.jndi2.client.NamingContextFactory"/>
<property name="java.naming.factory.host" value="localhost"/>
<property name="java.naming.factory.port" value="16400"/>
</InitialContext>
<User name="anonymous" password="anonymous" serverId="0"/>
<User name="anonymous" password="anonymous" serverId="1"/>
<TcpConnectionFactory name="foreignCF" host="localhost" port="16011">
<jndi name="foreignCF"/>
</TcpConnectionFactory>
<TcpConnectionFactory name="bridgeCF" host="localhost" port="16010">
<jndi name="bridgeCF"/>
</TcpConnectionFactory>
<Queue name="foreignQueue" serverId="1">
<freeReader />
<freeWriter />
<jndi name="foreignQueue" />
</Queue>
<RestDistributionQueue name="distQueue" foreign="foreignQueue" serverId="0">
<property name="rest.host" value="localhost" />
<property name="rest.port" value="8989" />
<property name="rest.idletimeout" value="10" />
<freeWriter />
<jndi name="distQueue" />
</RestDistributionQueue>
<RestAcquisitionQueue name="acqQueue" foreign="foreignQueue" serverId="0">
<property name="rest.host" value="localhost" />
<property name="rest.port" value="8989" />
<property name="rest.timeout" value="5000" />
<property name="rest.idletimeout" value="10" />
<freeReader />
<jndi name="acqQueue" />
</RestAcquisitionQueue>
</JoramAdmin>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment