[jboss-cvs] JBoss Messaging SVN: r3889 - projects/network-benchmark/src/network.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Mar 18 08:34:32 EDT 2008
Author: jmesnil
Date: 2008-03-18 08:34:32 -0400 (Tue, 18 Mar 2008)
New Revision: 3889
Modified:
projects/network-benchmark/src/network/NetworkClientTest.java
Log:
tweak
Modified: projects/network-benchmark/src/network/NetworkClientTest.java
===================================================================
--- projects/network-benchmark/src/network/NetworkClientTest.java 2008-03-18 12:16:43 UTC (rev 3888)
+++ projects/network-benchmark/src/network/NetworkClientTest.java 2008-03-18 12:34:32 UTC (rev 3889)
@@ -22,9 +22,14 @@
public class NetworkClientTest extends TestCase
{
+ // Configurable properties:
+ private static final String SERVER_HOST = "192.168.0.4";
+ private static final long DURATION = 10000; // in ms
+ public static final int MESSAGE_SIZE = 1000; // in bytes
+ private static final boolean ENABLE_TCP_NO_DELAY = false;
+
// Constants -----------------------------------------------------
- private static final String SERVER_HOST = "192.168.0.4";
public static final SocketAddress BIO_ADDRESS = new InetSocketAddress(
SERVER_HOST, 5555);
public static final SocketAddress NIO_ADDRESS = new InetSocketAddress(
@@ -32,11 +37,6 @@
public static final SocketAddress MINA_ADDRESS = new InetSocketAddress(
SERVER_HOST, 7777);
- private static final long DURATION = 10000; // in ms
- public static final int MESSAGE_SIZE = 1000; // in bytes
-
- private static final boolean ENABLE_TCP_NO_DELAY = false;
-
// Attributes ----------------------------------------------------
// Static --------------------------------------------------------
@@ -154,10 +154,10 @@
{
os.write(message);
- int b = is.read(response);
- if (b != MESSAGE_SIZE)
+ int size = is.read(response);
+ if (size != MESSAGE_SIZE)
{
- throw new IllegalStateException("Wrong byte");
+ throw new IllegalStateException("Wrong message size");
}
count++;
}
More information about the jboss-cvs-commits
mailing list