Commit 141b78d3 authored by legoc's avatar legoc

Changed publisher test

parent d3eb7dc0
...@@ -51,9 +51,9 @@ public class TestPublisherApplication { ...@@ -51,9 +51,9 @@ public class TestPublisherApplication {
Application.This.setRunning(); Application.This.setRunning();
// sending data // sending data
publisher.send("hello"); for (int i = 0; i < 100; ++i) {
publisher.send("world"); publisher.send("message " + i);
publisher.send("!"); }
publisher.terminate(); publisher.terminate();
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
package fr.ill.ics.cameo.test; package fr.ill.ics.cameo.test;
import java.util.Date;
import fr.ill.ics.cameo.Application; import fr.ill.ics.cameo.Application;
import fr.ill.ics.cameo.ConnectionTimeout; import fr.ill.ics.cameo.ConnectionTimeout;
import fr.ill.ics.cameo.Server; import fr.ill.ics.cameo.Server;
...@@ -53,6 +55,8 @@ public class TestSubscriberAndPublisherApplication { ...@@ -53,6 +55,8 @@ public class TestSubscriberAndPublisherApplication {
System.exit(-1); System.exit(-1);
} }
Date d = new Date();
try { try {
// loop the number of times. // loop the number of times.
for (int i = 0; i < numberOfTimes; ++i) { for (int i = 0; i < numberOfTimes; ++i) {
...@@ -92,7 +96,7 @@ public class TestSubscriberAndPublisherApplication { ...@@ -92,7 +96,7 @@ public class TestSubscriberAndPublisherApplication {
Application.This.terminate(); Application.This.terminate();
} }
System.out.println("finished the application"); System.out.println("finished the application after " + ((new Date()).getTime() - d.getTime()) + "ms");
} }
} }
\ No newline at end of file
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