directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r123378 - /incubator/directory/network/trunk/mina/src/test/org/apache/mina/examples/echoserver/Test.java
Date Mon, 27 Dec 2004 02:13:42 GMT
Author: trustin
Date: Sun Dec 26 18:13:39 2004
New Revision: 123378

URL: http://svn.apache.org/viewcvs?view=rev&rev=123378
Log:
 * Fixed: UDP test fails time to time.
Modified:
   incubator/directory/network/trunk/mina/src/test/org/apache/mina/examples/echoserver/Test.java

Modified: incubator/directory/network/trunk/mina/src/test/org/apache/mina/examples/echoserver/Test.java
Url: http://svn.apache.org/viewcvs/incubator/directory/network/trunk/mina/src/test/org/apache/mina/examples/echoserver/Test.java?view=diff&rev=123378&p1=incubator/directory/network/trunk/mina/src/test/org/apache/mina/examples/echoserver/Test.java&r1=123377&p2=incubator/directory/network/trunk/mina/src/test/org/apache/mina/examples/echoserver/Test.java&r2=123378
==============================================================================
--- incubator/directory/network/trunk/mina/src/test/org/apache/mina/examples/echoserver/Test.java
(original)
+++ incubator/directory/network/trunk/mina/src/test/org/apache/mina/examples/echoserver/Test.java
Sun Dec 26 18:13:39 2004
@@ -127,26 +127,20 @@
         client.setSoTimeout( 3000 );
 
         byte[] writeBuf = new byte[ 16 ];
+        byte[] readBuf = new byte[ writeBuf.length ];
+
+        client.setSoTimeout( 500 );
 
         for( int i = 0; i < 10; i++ )
         {
             fillWriteBuffer( writeBuf, i );
             client.send( writeBuf, writeBuf.length,
                          InetAddress.getLocalHost(), PORT );
-        }
-
-        byte[] readBuf = new byte[ writeBuf.length ];
-
-        for( int i = 0; i < 10; i++ )
-        {
-            fillWriteBuffer( writeBuf, i );
 
             assertEquals( readBuf.length, client.receive( readBuf,
                                                           readBuf.length ) );
             assertEquals( writeBuf, readBuf );
         }
-
-        client.setSoTimeout( 500 );
 
         try
         {

Mime
View raw message