[jboss-remoting-commits] JBoss Remoting SVN: r5349 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/timeout.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Mon Aug 17 17:11:26 EDT 2009


Author: ron.sigal at jboss.com
Date: 2009-08-17 17:11:26 -0400 (Mon, 17 Aug 2009)
New Revision: 5349

Modified:
   remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/timeout/SSLWriteTimeoutTestParent.java
Log:
JBREM-1120: Various fixes.

Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/timeout/SSLWriteTimeoutTestParent.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/timeout/SSLWriteTimeoutTestParent.java	2009-08-17 21:10:24 UTC (rev 5348)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/timeout/SSLWriteTimeoutTestParent.java	2009-08-17 21:11:26 UTC (rev 5349)
@@ -333,26 +333,86 @@
       }
       public Socket createSocket() throws IOException
       {
-         return new SSLTestSocket(timeout, initialWrites, ((SSLSocket) factory.createSocket()));
+         log.info("callbackTest: " + callbackTest);
+         Socket s = null;
+         if (callbackTest)
+         {
+            s = factory.createSocket();
+         }
+         else
+         {
+            s = new TestSocket(timeout, initialWrites);
+            s = new SSLTestSocket(timeout, initialWrites, ((SSLSocket) factory.createSocket()));
+         }
+         log.info(this + " returning " + s);
+         return s;
       }
       public Socket createSocket(String arg0, int arg1) throws IOException, UnknownHostException
       {
-         return new SSLTestSocket(arg0, arg1, timeout, initialWrites, ((SSLSocket) factory.createSocket()));
+         log.info("callbackTest: " + callbackTest);
+         Socket s = null;
+         if (callbackTest && arg1 != secondaryServerSocketPort)
+         {
+            s = factory.createSocket(arg0, arg1);
+         }
+         else
+         {
+            s = new TestSocket(timeout, initialWrites);
+            s = new SSLTestSocket(arg0, arg1, timeout, initialWrites, ((SSLSocket) factory.createSocket()));
+         }
+         log.info(this + " returning " + s);
+         return s;
       }
 
       public Socket createSocket(InetAddress arg0, int arg1) throws IOException
       {
-         return new SSLTestSocket(arg0, arg1, timeout, initialWrites, ((SSLSocket) factory.createSocket()));
+         log.info("callbackTest: " + callbackTest);
+         Socket s = null;
+         if (callbackTest && arg1 != secondaryServerSocketPort)
+         {
+            s = factory.createSocket(arg0, arg1);
+         }
+         else
+         {
+            s = new TestSocket(timeout, initialWrites);
+            s = new SSLTestSocket(arg0, arg1, timeout, initialWrites, ((SSLSocket) factory.createSocket()));
+         }
+         log.info(this + " returning " + s);
+         return s;
       }
 
       public Socket createSocket(String arg0, int arg1, InetAddress arg2, int arg3) throws IOException, UnknownHostException
       {
-         return new SSLTestSocket(arg0, arg1, arg2, arg3, timeout, initialWrites, ((SSLSocket) factory.createSocket()));
+         log.info("callbackTest: " + callbackTest);
+         Socket s = null;
+         if (callbackTest && arg1 != secondaryServerSocketPort)
+         {
+            s = factory.createSocket(arg0, arg1);
+         }
+         else
+         {
+            s = new TestSocket(timeout, initialWrites);
+            s = new SSLTestSocket(arg0, arg1, arg2, arg3, timeout, initialWrites, ((SSLSocket) factory.createSocket()));
+         }
+         log.info(this + " returning " + s);
+         return s;
       }
 
       public Socket createSocket(InetAddress arg0, int arg1, InetAddress arg2, int arg3) throws IOException
       {
-         return new SSLTestSocket(arg0, arg1, arg2, arg3, timeout, initialWrites, ((SSLSocket) factory.createSocket()));
+         log.info("callbackTest: " + callbackTest);
+         Socket s = null;
+         if (callbackTest && arg1 != secondaryServerSocketPort)
+         {
+            s = factory.createSocket(arg0, arg1);
+         }
+         else
+         {
+            s = new TestSocket(timeout, initialWrites);
+            s = new SSLTestSocket(arg0, arg1, arg2, arg3, timeout, initialWrites, ((SSLSocket) factory.createSocket()));
+         }
+         log.info(this + " returning " + s);
+         return s;
       }
       
       protected void setupFactory() throws IOException



More information about the jboss-remoting-commits mailing list