Commit 44bef325 authored by Andre Freyssinet's avatar Andre Freyssinet
Browse files

Tests the use of old Rest/JMS API.

parent 4d81d8a7
......@@ -69,6 +69,7 @@ public class BridgeRestSimpleBytesMessage extends TestCase implements MessageLis
startAgentServer1();
Thread.sleep(1000);
boolean useOldRestAPI = Boolean.getBoolean("useOldAPI");
try{
javax.jms.ConnectionFactory joramCF = TcpConnectionFactory.create("localhost", 16010);
......@@ -94,6 +95,7 @@ public class BridgeRestSimpleBytesMessage extends TestCase implements MessageLis
Queue queueDist = new RestDistributionQueue()
.setHost("localhost")
.setPort(8989)
.setUseOldAPI(useOldRestAPI)
.setPeriod(500)
.setBatch(true)
.create(0, "queueDist", "foreignQueue");
......@@ -101,7 +103,9 @@ public class BridgeRestSimpleBytesMessage extends TestCase implements MessageLis
System.out.println("joram distribution queue = " + queueDist);
// Create a REST acquisition queue on server.
Queue queueAcq = new RestAcquisitionQueue().create(0, "queueAcq", "foreignQueue");
Queue queueAcq = new RestAcquisitionQueue()
.setUseOldAPI(useOldRestAPI)
.create(0, "queueAcq", "foreignQueue");
queueAcq.setFreeReading();
System.out.println("joram acquisition queue = " + queueAcq);
......
......@@ -68,6 +68,7 @@ public class BridgeRestSimpleMapMessage extends TestCase implements MessageListe
startAgentServer1();
Thread.sleep(1000);
boolean useOldRestAPI = Boolean.getBoolean("useOldAPI");
try{
javax.jms.ConnectionFactory joramCF = TcpConnectionFactory.create("localhost", 16010);
......@@ -93,6 +94,7 @@ public class BridgeRestSimpleMapMessage extends TestCase implements MessageListe
Queue queueDist = new RestDistributionQueue()
.setHost("localhost")
.setPort(8989)
.setUseOldAPI(useOldRestAPI)
.setPeriod(500)
.setBatch(true)
.create(0, "queueDist", "foreignQueue");
......@@ -100,7 +102,9 @@ public class BridgeRestSimpleMapMessage extends TestCase implements MessageListe
System.out.println("joram distribution queue = " + queueDist);
// Create a REST acquisition queue on server.
Queue queueAcq = new RestAcquisitionQueue().create(0, "queueAcq", "foreignQueue");
Queue queueAcq = new RestAcquisitionQueue()
.setUseOldAPI(useOldRestAPI)
.create(0, "queueAcq", "foreignQueue");
queueAcq.setFreeReading();
System.out.println("joram acquisition queue = " + queueAcq);
......
......@@ -69,6 +69,7 @@ public class BridgeRestSimpleTextMessage extends TestCase implements MessageList
startAgentServer1();
Thread.sleep(1000);
boolean useOldRestAPI = Boolean.getBoolean("useOldAPI");
try{
javax.jms.ConnectionFactory joramCF = TcpConnectionFactory.create("localhost", 16010);
......@@ -94,6 +95,7 @@ public class BridgeRestSimpleTextMessage extends TestCase implements MessageList
Queue queueDist = new RestDistributionQueue()
.setHost("localhost")
.setPort(8989)
.setUseOldAPI(useOldRestAPI)
.setPeriod(500)
.setBatch(true)
.create(0, "queueDist", "foreignQueue");
......@@ -101,7 +103,10 @@ public class BridgeRestSimpleTextMessage extends TestCase implements MessageList
System.out.println("joram distribution queue = " + queueDist);
// Create a REST acquisition queue on server.
Queue queueAcq = new RestAcquisitionQueue().setMediaTypeJson(false).create(0, "queueAcq", "foreignQueue");
Queue queueAcq = new RestAcquisitionQueue()
.setUseOldAPI(useOldRestAPI)
.setMediaTypeJson(false)
.create(0, "queueAcq", "foreignQueue");
queueAcq.setFreeReading();
System.out.println("joram acquisition queue = " + queueAcq);
......
......@@ -5835,8 +5835,11 @@
<target name="tests.bridge.rest"
description=" --> launch all REST tests">
<antcall target="bridge.rest.simpleText" />
<antcall target="bridge.rest.simpleText.old" />
<antcall target="bridge.rest.simpleBytes" />
<antcall target="bridge.rest.simpleBytes.old" />
<antcall target="bridge.rest.simpleMap" />
<antcall target="bridge.rest.simpleMap.old" />
<antcall target="bridge.rest.test1" />
<antcall target="bridge.rest.test2" />
<antcall target="bridge.rest.test3" />
......@@ -5886,6 +5889,19 @@
</antcall>
</target>
<target name="bridge.rest.simpleText.old"
description=" --> Test simple send/receive a TextMessage">
<antcall target="run.bridgerest" inheritAll="true">
<param name="testid" value="bridge.rest.simpleText.old" />
<param name="className" value="joram.bridgerest.BridgeRestSimpleTextMessage" />
<param name="SCAdminClass" value="framework.SCAdminOSGi" />
<param name="isOSGi" value="true" />
<param name="jndiconf" value="jndi.properties" />
<param name="a3conf" value="a3servers.xml" />
<param name="jvmargs" value="-DuseOldAPI=true-DuseOldAPI=true" />
</antcall>
</target>
<target name="bridge.rest.simpleBytes"
description=" --> Test simple send/receive a BytesMessage">
<antcall target="run.bridgerest" inheritAll="true">
......@@ -5899,6 +5915,19 @@
</antcall>
</target>
<target name="bridge.rest.simpleBytes.old"
description=" --> Test simple send/receive a BytesMessage">
<antcall target="run.bridgerest" inheritAll="true">
<param name="testid" value="bridge.rest.simpleBytes.old" />
<param name="className" value="joram.bridgerest.BridgeRestSimpleBytesMessage" />
<param name="SCAdminClass" value="framework.SCAdminOSGi" />
<param name="isOSGi" value="true" />
<param name="jndiconf" value="jndi.properties" />
<param name="a3conf" value="a3servers.xml" />
<param name="jvmargs" value="-DuseOldAPI=true" />
</antcall>
</target>
<target name="bridge.rest.simpleMap"
description=" --> Test simple send/receive a MapMessage">
<antcall target="run.bridgerest" inheritAll="true">
......@@ -5912,6 +5941,19 @@
</antcall>
</target>
<target name="bridge.rest.simpleMap.old"
description=" --> Test simple send/receive a MapMessage">
<antcall target="run.bridgerest" inheritAll="true">
<param name="testid" value="bridge.rest.simpleMap.old" />
<param name="className" value="joram.bridgerest.BridgeRestSimpleMapMessage" />
<param name="SCAdminClass" value="framework.SCAdminOSGi" />
<param name="isOSGi" value="true" />
<param name="jndiconf" value="jndi.properties" />
<param name="a3conf" value="a3servers.xml" />
<param name="jvmargs" value="-DuseOldAPI=true" />
</antcall>
</target>
<target name="bridge.rest.test1"
description=" --> Tests behavior of the acquisition queue during foreign server failures">
<antcall target="run.bridgerest" inheritAll="true">
......
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