Author: ron.sigal(a)jboss.com
Date: 2008-02-29 16:35:37 -0500 (Fri, 29 Feb 2008)
New Revision: 3546
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/configuration/SocketServerSocketConfigurationTestCase.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/configuration/SocketSocketConfigurationTestCase.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/ssl/config/SSLSocketServerSocketConfigurationTestCase.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/ssl/config/SSLSocketSocketConfigurationTestCase.java
Log:
JBREM-703: Treat receiveBufferSize, sendBufferSize, and trafficClass as suggestions.
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/configuration/SocketServerSocketConfigurationTestCase.java
===================================================================
---
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/configuration/SocketServerSocketConfigurationTestCase.java 2008-02-29
21:34:13 UTC (rev 3545)
+++
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/configuration/SocketServerSocketConfigurationTestCase.java 2008-02-29
21:35:37 UTC (rev 3546)
@@ -174,13 +174,23 @@
{
assertTrue(s.getKeepAlive());
assertTrue(s.getOOBInline());
- assertEquals(2345, s.getReceiveBufferSize());
- assertEquals(3456, s.getSendBufferSize());
+ suggestEquals(2345, s.getReceiveBufferSize(), "receiveBufferSize");
+ suggestEquals(3456, s.getSendBufferSize(), "sendBufferSize");
assertEquals(4567, s.getSoLinger());
- assertEquals(0, s.getTrafficClass());
+ suggestEquals(0, s.getTrafficClass(), "trafficClass");
}
+ protected void suggestEquals(int i1, int i2, String s)
+ {
+ if (i1 != i2)
+ {
+ log.warn(s + " has not been set: expected " + i1 + ", got "
+ i2);
+ log.warn("note that setting \"" + s + "\" is just a
suggestion to the underlying network code");
+ }
+ }
+
+
protected String getTransport()
{
return "socket";
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/configuration/SocketSocketConfigurationTestCase.java
===================================================================
---
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/configuration/SocketSocketConfigurationTestCase.java 2008-02-29
21:34:13 UTC (rev 3545)
+++
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/configuration/SocketSocketConfigurationTestCase.java 2008-02-29
21:35:37 UTC (rev 3546)
@@ -146,13 +146,23 @@
{
assertTrue(s.getKeepAlive());
assertTrue(s.getOOBInline());
- assertEquals(2345, s.getReceiveBufferSize());
- assertEquals(3456, s.getSendBufferSize());
+ suggestEquals(2345, s.getReceiveBufferSize(), "receiveBufferSize");
+ suggestEquals(3456, s.getSendBufferSize(), "sendBufferSize");
assertEquals(4567, s.getSoLinger());
- assertEquals(0, s.getTrafficClass());
+ suggestEquals(0, s.getTrafficClass(), "trafficClass");
}
+ protected void suggestEquals(int i1, int i2, String s)
+ {
+ if (i1 != i2)
+ {
+ log.warn(s + " has not been set: expected " + i1 + ", got "
+ i2);
+ log.warn("note that setting \"" + s + "\" is just a
suggestion to the underlying network code");
+ }
+ }
+
+
protected String getTransport()
{
return "socket";
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/ssl/config/SSLSocketServerSocketConfigurationTestCase.java
===================================================================
---
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/ssl/config/SSLSocketServerSocketConfigurationTestCase.java 2008-02-29
21:34:13 UTC (rev 3545)
+++
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/ssl/config/SSLSocketServerSocketConfigurationTestCase.java 2008-02-29
21:35:37 UTC (rev 3546)
@@ -109,10 +109,10 @@
protected void doSocketTest(Socket s) throws SocketException
{
assertTrue(s.getKeepAlive());
- assertEquals(2345, s.getReceiveBufferSize());
- assertEquals(3456, s.getSendBufferSize());
+ suggestEquals(2345, s.getReceiveBufferSize(), "receiveBufferSize");
+ suggestEquals(3456, s.getSendBufferSize(), "sendBufferSize");
assertEquals(4567, s.getSoLinger());
- assertEquals(0, s.getTrafficClass());
+ suggestEquals(0, s.getTrafficClass(), "trafficClass");
assertTrue(s instanceof SSLSocket);
SSLSocket ss = (SSLSocket) s;
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/ssl/config/SSLSocketSocketConfigurationTestCase.java
===================================================================
---
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/ssl/config/SSLSocketSocketConfigurationTestCase.java 2008-02-29
21:34:13 UTC (rev 3545)
+++
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/socket/ssl/config/SSLSocketSocketConfigurationTestCase.java 2008-02-29
21:35:37 UTC (rev 3546)
@@ -126,10 +126,10 @@
protected void doSocketTest(Socket s) throws SocketException
{
assertTrue(s.getKeepAlive());
- assertEquals(2345, s.getReceiveBufferSize());
- assertEquals(3456, s.getSendBufferSize());
+ suggestEquals(2345, s.getReceiveBufferSize(), "receiveBufferSize");
+ suggestEquals(3456, s.getSendBufferSize(), "sendBufferSize");
assertEquals(4567, s.getSoLinger());
- assertEquals(0, s.getTrafficClass());
+ suggestEquals(0, s.getTrafficClass(), "trafficClass");
assertTrue(s instanceof SSLSocket);
SSLSocket ss = (SSLSocket) s;