tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r1198561 - in /tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test: ./ channel/ transport/
Date Sun, 06 Nov 2011 21:16:52 GMT
Author: kkolinko
Date: Sun Nov  6 21:16:52 2011
New Revision: 1198561

URL: http://svn.apache.org/viewvc?rev=1198561&view=rev
Log:
Porting r1187806 - whitespace cleanup in /test

Modified:
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/NioSenderTest.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestMulticastPackages.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestRemoteProcessException.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestUdpPackages.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketReceive.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketSend.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketTribesReceive.java
    tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketValidateReceive.java

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/NioSenderTest.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/NioSenderTest.java?rev=1198561&r1=1198560&r2=1198561&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/NioSenderTest.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/NioSenderTest.java Sun Nov 
6 21:16:52 2011
@@ -45,17 +45,17 @@ public class NioSenderTest {
     public NioSenderTest()  {
         // Default constructor
     }
-    
+
     public synchronized int inc() {
         return ++counter;
     }
-    
+
     public synchronized ChannelData getMessage(Member mbr) {
         String msg = "Thread-"+Thread.currentThread().getName()+" Message:"+inc();
         ChannelData data = new ChannelData(true);
         data.setMessage(new XByteBuffer(msg.getBytes(),false));
         data.setAddress(mbr);
-        
+
         return data;
     }
 
@@ -107,7 +107,7 @@ public class NioSenderTest {
                         sender.reset();
                         sender.setMessage(XByteBuffer.createDataPackage(getMessage(mbr)));
                     }
-                    
+
 
                 } catch (Throwable t) {
                     t.printStackTrace();

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestMulticastPackages.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestMulticastPackages.java?rev=1198561&r1=1198560&r2=1198561&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestMulticastPackages.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestMulticastPackages.java
Sun Nov  6 21:16:52 2011
@@ -83,7 +83,7 @@ public class TestMulticastPackages {
         AbstractSender s2 =(AbstractSender) ((ReplicationTransmitter)channel2.getChannelSender()).getTransport();
         s1.setTimeout(Long.MAX_VALUE); //for debugging
         s2.setTimeout(Long.MAX_VALUE); //for debugging
-        
+
         System.err.println("Starting Single package NO_ACK");
         channel1.send(new Member[] {channel2.getLocalMember(false)}, Data.createRandomData(1024),Channel.SEND_OPTIONS_MULTICAST);
         Thread.sleep(500);
@@ -91,7 +91,7 @@ public class TestMulticastPackages {
         assertEquals("Checking success messages.",1,listener1.count.get());
     }
 
-    
+
     public static void printMissingMsgs(int[] msgs, int maxIdx) {
         for (int i=0; i<maxIdx && i<msgs.length; i++) {
             if (msgs[i]==0) System.out.print(i+", ");
@@ -128,7 +128,7 @@ public class TestMulticastPackages {
                     }
                 }
             };
-        } 
+        }
         for (int x=0; x<threads.length; x++ ) { threads[x].start();}
         for (int x=0; x<threads.length; x++ ) { threads[x].join();}
         //sleep for 50 sec, let the other messages in
@@ -218,7 +218,7 @@ public class TestMulticastPackages {
         public static Data createRandomData(int size) {
             return createRandomData(size,-1);
         }
-        
+
         public static Data createRandomData(int size, int number) {
             int i = r.nextInt();
             i = ( i % 127 );
@@ -236,7 +236,7 @@ public class TestMulticastPackages {
             }
             return d;
         }
-        
+
         public int getNumber() {
             if (!hasNr) return -1;
             return XByteBuffer.toInt(this.data, 0);

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestRemoteProcessException.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestRemoteProcessException.java?rev=1198561&r1=1198560&r2=1198561&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestRemoteProcessException.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestRemoteProcessException.java
Sun Nov  6 21:16:52 2011
@@ -33,12 +33,12 @@ import org.apache.catalina.tribes.Member
 import org.apache.catalina.tribes.group.GroupChannel;
 
 /**
- * <p>Title: </p> 
- * 
- * <p>Description: </p> 
- * 
+ * <p>Title: </p>
+ *
+ * <p>Description: </p>
+ *
  * <p>Company: </p>
- * 
+ *
  * @author not attributable
  * @version 1.0
  */

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestUdpPackages.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestUdpPackages.java?rev=1198561&r1=1198560&r2=1198561&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestUdpPackages.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/channel/TestUdpPackages.java
Sun Nov  6 21:16:52 2011
@@ -83,7 +83,7 @@ public class TestUdpPackages {
         AbstractSender s2 =(AbstractSender) ((ReplicationTransmitter)channel2.getChannelSender()).getTransport();
         s1.setTimeout(Long.MAX_VALUE); //for debugging
         s2.setTimeout(Long.MAX_VALUE); //for debugging
-        
+
         System.err.println("Starting Single package NO_ACK");
         channel1.send(new Member[] {channel2.getLocalMember(false)}, Data.createRandomData(1024),Channel.SEND_OPTIONS_UDP);
         Thread.sleep(500);
@@ -120,7 +120,7 @@ public class TestUdpPackages {
                     }
                 }
             };
-        } 
+        }
         for (int x=0; x<threads.length; x++ ) { threads[x].start();}
         for (int x=0; x<threads.length; x++ ) { threads[x].join();}
         //sleep for 50 sec, let the other messages in
@@ -132,7 +132,7 @@ public class TestUdpPackages {
         printMissingMsgs(listener1.nrs,counter.get());
         assertEquals("Checking success messages.",msgCount*threadCount,listener1.count.get());
     }
-    
+
     public static void printMissingMsgs(int[] msgs, int maxIdx) {
         for (int i=0; i<maxIdx && i<msgs.length; i++) {
             if (msgs[i]==0) System.out.print(i+", ");
@@ -169,7 +169,7 @@ public class TestUdpPackages {
                     }
                 }
             };
-        } 
+        }
         for (int x=0; x<threads.length; x++ ) { threads[x].start();}
         for (int x=0; x<threads.length; x++ ) { threads[x].join();}
         //sleep for 50 sec, let the other messages in
@@ -259,7 +259,7 @@ public class TestUdpPackages {
         public static Data createRandomData(int size) {
             return createRandomData(size,-1);
         }
-        
+
         public static Data createRandomData(int size, int number) {
             int i = r.nextInt();
             i = ( i % 127 );
@@ -277,7 +277,7 @@ public class TestUdpPackages {
             }
             return d;
         }
-        
+
         public int getNumber() {
             if (!hasNr) return -1;
             return XByteBuffer.toInt(this.data, 0);

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java?rev=1198561&r1=1198560&r2=1198561&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketNioReceive.java
Sun Nov  6 21:16:52 2011
@@ -64,11 +64,11 @@ public class SocketNioReceive {
             }
         }
     }
-    
+
     public static class MyList implements MessageListener {
         boolean first = true;
-        
-        
+
+
         @Override
         public void messageReceived(ChannelMessage msg) {
             if (first) {
@@ -82,7 +82,7 @@ public class SocketNioReceive {
                 seconds = ( (double) (time - start)) / 1000;
                 System.out.println("Throughput " + df.format(mb / seconds) + " MB/seconds,
messages "+count+", total "+mb+" MB.");
             }
-        }        
+        }
 
         @Override
         public boolean accept(ChannelMessage msg) {

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java?rev=1198561&r1=1198560&r2=1198561&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketNioValidateSend.java
Sun Nov  6 21:16:52 2011
@@ -55,7 +55,7 @@ public class SocketNioValidateSend {
         double mb = 0;
         boolean first = true;
         int count = 0;
-        
+
         DecimalFormat df = new DecimalFormat("##.00");
         while (count<100000) {
             if (first) {

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketReceive.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketReceive.java?rev=1198561&r1=1198560&r2=1198561&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketReceive.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketReceive.java
Sun Nov  6 21:16:52 2011
@@ -32,9 +32,9 @@ public class SocketReceive {
     static BigDecimal total = new BigDecimal(0);
     static BigDecimal bytes = new BigDecimal(32871);
 
-    
+
     public static void main(String[] args) throws Exception {
-    
+
         ServerSocket srvSocket = new ServerSocket(9999);
         System.out.println("Listening on 9999");
         Socket socket = srvSocket.accept();
@@ -70,7 +70,7 @@ public class SocketReceive {
                 printStats(start, mb, count, df, total);
             }
         }
-        
+
     }
 
     private static void printStats(long start, double mb, int count, DecimalFormat df, BigDecimal
total) {

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketSend.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketSend.java?rev=1198561&r1=1198560&r2=1198561&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketSend.java (original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketSend.java Sun
Nov  6 21:16:52 2011
@@ -30,8 +30,8 @@ import org.apache.catalina.tribes.member
 public class SocketSend {
 
     public static void main(String[] args) throws Exception {
-        
-        
+
+
         Member mbr = new MemberImpl("localhost", 9999, 0);
         ChannelData data = new ChannelData();
         data.setOptions(Channel.SEND_OPTIONS_BYTE_MESSAGE);
@@ -62,7 +62,7 @@ public class SocketSend {
                 System.out.println("Throughput "+df.format(mb/seconds)+" MB/seconds messages
"+count+", total "+mb+" MB, total "+total+" bytes.");
             }
         }
-        out.flush(); 
+        out.flush();
         System.out.println("Complete, sleeping 5 seconds");
         Thread.sleep(5000);
 

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketTribesReceive.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketTribesReceive.java?rev=1198561&r1=1198560&r2=1198561&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketTribesReceive.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketTribesReceive.java
Sun Nov  6 21:16:52 2011
@@ -35,7 +35,7 @@ public class SocketTribesReceive {
     static BigDecimal total = new BigDecimal((double)0);
     static BigDecimal bytes = new BigDecimal((double)32871);
 
-    
+
     public static void main(String[] args) throws Exception {
         int size = 43800;
         if (args.length > 0 ) try {size=Integer.parseInt(args[0]);}catch(Exception x){
/* Ignore */ }
@@ -78,7 +78,7 @@ public class SocketTribesReceive {
                 printStats(start, mb, count, df, total);
             }
         }
-        
+
     }
 
     private static void printStats(long start, double mb, int count, DecimalFormat df, BigDecimal
total) {

Modified: tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketValidateReceive.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketValidateReceive.java?rev=1198561&r1=1198560&r2=1198561&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketValidateReceive.java
(original)
+++ tomcat/tc7.0.x/trunk/test/org/apache/catalina/tribes/test/transport/SocketValidateReceive.java
Sun Nov  6 21:16:52 2011
@@ -32,11 +32,11 @@ public class SocketValidateReceive {
     static BigDecimal total = new BigDecimal(0);
     static BigDecimal bytes = new BigDecimal(32871);
 
-    
+
     public static void main(String[] args) throws Exception {
         int size = 43800;
         if (args.length > 0 ) try {size=Integer.parseInt(args[0]);}catch(Exception x){
/* Ignore */ }
-   
+
         ServerSocket srvSocket = new ServerSocket(9999);
         System.out.println("Listening on 9999");
         Socket socket = srvSocket.accept();
@@ -65,7 +65,7 @@ public class SocketValidateReceive {
                 System.exit(1);
             }
             count += reader.append(buf,0,len);
-            
+
             if ( bytes.intValue() != len ) bytes = new BigDecimal((double)len);
             total = total.add(bytes);
             mb += ( (double) len) / 1024 / 1024;
@@ -73,7 +73,7 @@ public class SocketValidateReceive {
                 printStats(start, mb, count, df, total);
             }
         }
-        
+
     }
 
     private static void printStats(long start, double mb, int count, DecimalFormat df, BigDecimal
total) {
@@ -81,7 +81,7 @@ public class SocketValidateReceive {
         double seconds = ((double)(time-start))/1000;
         System.out.println("Throughput "+df.format(mb/seconds)+" MB/seconds messages "+count+",
total "+mb+" MB, total "+total+" bytes.");
     }
-    
+
     public static class MyDataReader {
         int length = 10;
         int cur = 0;
@@ -89,10 +89,10 @@ public class SocketValidateReceive {
         public MyDataReader(int len) {
             length = len;
         }
-        
+
         public int append(byte[] b, int off, int len) throws Exception {
             int packages = 0;
-            for ( int i=off; i<len; i++ ) { 
+            for ( int i=off; i<len; i++ ) {
                 if ( cur == length ) {
                     cur = 0;
                     seq++;



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message