Commit 77d15e1a authored by legoc's avatar legoc

Changed a test

parent 603bca82
......@@ -127,6 +127,10 @@
<application name="startrepjava" starting_time="inf" retries="0" stopping_time="1" stream="yes" log_directory="logs" multiple="no" restart="no">
<start executable="java" args="-classpath cameo-tests-jzmq/target/cameo-tests-jzmq-0.0.1-full.jar fr.ill.ics.cameo.test.TestRequesterAndResponderApplication repjava"/>
</application>
<application name="startendpointjava" starting_time="inf" retries="0" stopping_time="1" stream="yes" log_directory="logs" multiple="no" restart="no">
<start executable="java" args="-classpath cameo-tests-jzmq/target/cameo-tests-jzmq-0.0.1-full.jar fr.ill.ics.cameo.test.TestEndpoint"/>
</application>
<!-- Managed cpp apps -->
<application name="simplecpp" starting_time="0" retries="0" stopping_time="1" stream="yes" log_directory="logs" multiple="no" restart="no">
......
......@@ -16,44 +16,25 @@
package fr.ill.ics.cameo.test;
import fr.ill.ics.cameo.Application;
import fr.ill.ics.cameo.Application.This;
import fr.ill.ics.cameo.Server;
public class TestBadEndpoint {
public class TestEndpoint {
public static void main(String[] args) {
Application.This.init(args);
Server server = null;
Server server = This.getServer();
// loop with fast application
try {
try {
server = new Server("tcp://bad:7000");
if (!server.isAvailable()) {
System.out.println("no connection to server");
return;
}
} catch (Exception e) {
System.out.println("The server has bad endpoint.");
}
try {
server = new Server("tcp//bad:7000");
if (!server.isAvailable()) {
System.out.println("no connection to server");
return;
}
} catch (Exception e) {
System.out.println("The server has bad endpoint.");
while (true) {
System.out.println("connection to server : " + server.isAvailable());
}
} finally {
if (server != null) {
server.terminate();
}
Application.This.terminate();
}
}
......
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