Reverse the order of test to unblock the channel from async tests
diff --git a/apps/foo/src/main/java/org/onlab/onos/foo/SimpleNettyClient.java b/apps/foo/src/main/java/org/onlab/onos/foo/SimpleNettyClient.java
index aafe084..337d506 100644
--- a/apps/foo/src/main/java/org/onlab/onos/foo/SimpleNettyClient.java
+++ b/apps/foo/src/main/java/org/onlab/onos/foo/SimpleNettyClient.java
@@ -1,5 +1,7 @@
package org.onlab.onos.foo;
+import static java.lang.Thread.sleep;
+
import java.io.IOException;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
@@ -79,15 +81,6 @@
response.get(100000, TimeUnit.MILLISECONDS);
}
- log.info("measuring async sender");
- Timer sendAsyncTimer = metrics.createTimer(component, feature, "AsyncSender");
-
- for (int i = 0; i < iterations; i++) {
- Timer.Context context = sendAsyncTimer.time();
- messaging.sendAsync(endpoint, "simple", "Hello World".getBytes());
- context.stop();
- }
-
log.info("measuring round-trip send & receive");
Timer sendAndReceiveTimer = metrics.createTimer(component, feature, "SendAndReceive");
int timeouts = 0;
@@ -108,6 +101,17 @@
}
// System.out.println("Got back:" + new String(response.get(2, TimeUnit.SECONDS)));
}
+
+ sleep(1000);
+ log.info("measuring async sender");
+ Timer sendAsyncTimer = metrics.createTimer(component, feature, "AsyncSender");
+
+ for (int i = 0; i < iterations; i++) {
+ Timer.Context context = sendAsyncTimer.time();
+ messaging.sendAsync(endpoint, "simple", "Hello World".getBytes());
+ context.stop();
+ }
+ sleep(1000);
}
public static void stop() {
diff --git a/apps/foo/src/main/java/org/onlab/onos/foo/SimpleNettyClientCommand.java b/apps/foo/src/main/java/org/onlab/onos/foo/SimpleNettyClientCommand.java
index f089a72..b59ff38 100644
--- a/apps/foo/src/main/java/org/onlab/onos/foo/SimpleNettyClientCommand.java
+++ b/apps/foo/src/main/java/org/onlab/onos/foo/SimpleNettyClientCommand.java
@@ -25,7 +25,7 @@
@Argument(index = 2, name = "warmupCount", description = "Warm-up count",
required = false, multiValued = false)
- String warmupCount = "10000";
+ String warmupCount = "1000";
@Argument(index = 3, name = "messageCount", description = "Message count",
required = false, multiValued = false)