Commit 141b78d3 authored by legoc's avatar legoc

Changed publisher test

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