Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
joram
joram
Commits
d5ff0193
Commit
d5ff0193
authored
Sep 27, 2017
by
afreyssin
Browse files
Tests the XML administration scripts.
parent
8de3adca
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/src/joram/bridgerest/BridgeRestTest6.java
View file @
d5ff0193
...
...
@@ -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
()
.
setHost
Name
(
"localhost"
)
.
setHost
(
"localhost"
)
.
setPort
(
8989
)
.
setPeriod
(
1000
)
.
setIdleTimeout
(
10
)
...
...
tests/src/joram/bridgerest/joramAdmin.xml
0 → 100644
View file @
d5ff0193
<?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>
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment