JBoss Remoting SVN: r4228 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-22 18:36:57 -0400 (Thu, 22 May 2008)
New Revision: 4228
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/NetworkRegistryProxyTestCase.java
Log:
JBREM-977: Updated name of test method.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/NetworkRegistryProxyTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/NetworkRegistryProxyTestCase.java 2008-05-22 22:31:52 UTC (rev 4227)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/security/NetworkRegistryProxyTestCase.java 2008-05-22 22:36:57 UTC (rev 4228)
@@ -91,7 +91,7 @@
}
- public void testCallbackStoreProxy() throws Throwable
+ public void testNetworkRegistryProxy() throws Throwable
{
log.info("entering " + getName());
16 years, 6 months
JBoss Remoting SVN: r4227 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-22 18:31:52 -0400 (Thu, 22 May 2008)
New Revision: 4227
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/ServerThread.java
Log:
JBREM-982: Sets useOnewayConnectionTimeout = true as default..
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java 2008-05-22 05:34:55 UTC (rev 4226)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java 2008-05-22 22:31:52 UTC (rev 4227)
@@ -212,7 +212,7 @@
protected int numberOfCallRetries;
protected int maxPoolSize;
protected int onewayConnectionTimeout;
- protected boolean useOnewayConnectionTimeout = false;
+ protected boolean useOnewayConnectionTimeout = true;
/**
* Pool for this invoker. This is shared between all instances of proxies attached to a specific
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/ServerThread.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/ServerThread.java 2008-05-22 05:34:55 UTC (rev 4226)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/ServerThread.java 2008-05-22 22:31:52 UTC (rev 4227)
@@ -149,7 +149,7 @@
private boolean reuseAfterTimeout;
- private boolean useOnewayConnectionTimeout = false;
+ private boolean useOnewayConnectionTimeout = true;
// Constructors ---------------------------------------------------------------------------------
16 years, 6 months
JBoss Remoting SVN: r4226 - remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-22 01:34:55 -0400 (Thu, 22 May 2008)
New Revision: 4226
Modified:
remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java
Log:
JBREM-982: Reset default onewayConnectionTimeout to 2000 ms.
Modified: remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java
===================================================================
--- remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java 2008-05-22 05:26:18 UTC (rev 4225)
+++ remoting2/branches/2.x/src/main/org/jboss/remoting/transport/socket/MicroSocketClientInvoker.java 2008-05-22 05:34:55 UTC (rev 4226)
@@ -107,7 +107,7 @@
public static final int MAX_POOL_SIZE = 50;
/** Default timeout value used by OnewayConnectionTask. Value is 2 seconds. */
- public static final int ONEWAY_CONNECTION_TIMEOUT_DEFAULT = 5000;
+ public static final int ONEWAY_CONNECTION_TIMEOUT_DEFAULT = 2000;
// Static ---------------------------------------------------------------------------------------
@@ -841,7 +841,7 @@
}
response = versionedRead(inputStream, unmarshaller, version);
- }
+ }
// Note that resetting the timeout value after closing the socket results
// in an exception, so the reset is not done in a finally clause. However,
16 years, 6 months
JBoss Remoting SVN: r4225 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/stream.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-22 01:26:18 -0400 (Thu, 22 May 2008)
New Revision: 4225
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/stream/StreamingTestClient.java
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/stream/StreamingTestServer.java
Log:
JBREM-930: Changed System.out.println() to log.info().
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/stream/StreamingTestClient.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/stream/StreamingTestClient.java 2008-05-22 05:08:46 UTC (rev 4224)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/stream/StreamingTestClient.java 2008-05-22 05:26:18 UTC (rev 4225)
@@ -23,6 +23,8 @@
package org.jboss.test.remoting.stream;
import junit.framework.TestCase;
+
+import org.apache.log4j.Logger;
import org.jboss.remoting.Client;
import org.jboss.remoting.InvokerLocator;
@@ -36,6 +38,8 @@
*/
public class StreamingTestClient extends TestCase
{
+ private static Logger log = Logger.getLogger(StreamingTestClient.class);
+
// Default locator values
private static String transport = "socket";
private static String host = "localhost";
@@ -71,8 +75,8 @@
// Thread.sleep(5000);
// assertFalse(error);
- System.out.println("Waiting to give server a chance to send ");
- System.out.println("org.jboss.remoting.stream.StreamHandler.CLOSE message");
+ log.info("Waiting to give server a chance to send ");
+ log.info("org.jboss.remoting.stream.StreamHandler.CLOSE message");
Thread.sleep(5000);
}
@@ -88,7 +92,7 @@
String param = "foobar";
long fileLength = testFile.length();
- System.out.println("File size = " + fileLength);
+ log.info("File size = " + fileLength);
Object ret = remotingClient.invoke(fileInput, param);
Map responseMap = (Map)ret;
@@ -102,15 +106,15 @@
Object response = remotingClient.invoke("get_size");
int returnedFileLength = ((Integer) response).intValue();
- System.out.println("Invocation response: " + response);
+ log.info("Invocation response: " + response);
if(fileLength == returnedFileLength)
{
- System.out.println("PASS");
+ log.info("PASS");
}
else
{
- System.out.println("FAILED - returned file length was " + returnedFileLength);
+ log.info("FAILED - returned file length was " + returnedFileLength);
}
assertEquals(fileLength, returnedFileLength);
}
@@ -120,7 +124,7 @@
String bindAddr = System.getProperty("jrunit.bind_addr", host);
locatorURI = transport + "://" + bindAddr + ":" + port;
InvokerLocator locator = new InvokerLocator(locatorURI);
- System.out.println("Calling remoting server with locator uri of: " + locatorURI);
+ log.info("Calling remoting server with locator uri of: " + locatorURI);
remotingClient = new Client(locator, "test_stream");
remotingClient.connect();
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/stream/StreamingTestServer.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/stream/StreamingTestServer.java 2008-05-22 05:08:46 UTC (rev 4224)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/stream/StreamingTestServer.java 2008-05-22 05:26:18 UTC (rev 4225)
@@ -28,6 +28,8 @@
import java.util.Map;
import java.util.HashMap;
import javax.management.MBeanServer;
+
+import org.apache.log4j.Logger;
import org.jboss.jrunit.extensions.ServerTestCase;
import org.jboss.remoting.InvocationRequest;
import org.jboss.remoting.InvokerLocator;
@@ -41,6 +43,8 @@
*/
public class StreamingTestServer extends ServerTestCase
{
+ private static Logger log = Logger.getLogger(StreamingTestServer.class);
+
// Default locator values
private static String transport = "socket";
private static String host = "localhost";
@@ -54,7 +58,7 @@
String bindAddr = System.getProperty("jrunit.bind_addr", host);
locatorURI = transport + "://" + bindAddr + ":" + port;
InvokerLocator locator = new InvokerLocator(locatorURI);
- System.out.println("Starting remoting server with locator uri of: " + locatorURI);
+ log.info("Starting remoting server with locator uri of: " + locatorURI);
connector = new Connector();
connector.setInvokerLocator(locator.getLocatorURI());
connector.create();
@@ -64,6 +68,7 @@
connector.addInvocationHandler("test_stream", invocationHandler);
connector.start();
+ log.info("Started remoting server with locator uri of: " + locatorURI);
}
protected void setUp() throws Exception
@@ -130,7 +135,7 @@
public Object invoke(InvocationRequest invocation) throws Throwable
{
// Print out the invocation request
- System.out.println("Invocation request is: " + invocation.getParameter());
+ log.info("Invocation request is: " + invocation.getParameter());
// Just going to return static string as this is just simple example code.
return new Integer(streamSize);
@@ -197,7 +202,7 @@
}
byte[] bytes = out.toByteArray();
streamSize = bytes.length;
- System.out.println("Read stream. Contents is: " + new String(bytes));
+ log.info("Read stream. Contents is: " + new String(bytes));
}
catch(IOException e)
{
16 years, 6 months
JBoss Remoting SVN: r4224 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-22 01:08:46 -0400 (Thu, 22 May 2008)
New Revision: 4224
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/BisocketTestCase.java
Log:
JBREM-930: In internalSetUp(), stops Connector after unsuccessful attempt to start it.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/BisocketTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/BisocketTestCase.java 2008-05-22 04:20:49 UTC (rev 4223)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/BisocketTestCase.java 2008-05-22 05:08:46 UTC (rev 4224)
@@ -153,6 +153,7 @@
catch (Exception e)
{
log.info("unable to start Connector for " + serverLocator, e);
+ connector.stop();
Thread.sleep(60000);
}
}
16 years, 6 months
JBoss Remoting SVN: r4223 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback/acknowledge.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-22 00:20:49 -0400 (Thu, 22 May 2008)
New Revision: 4223
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback/acknowledge/CallbackAcknowledgeTestCase.java
Log:
JBREM-930: In testBlockingPollApplicationAckDifferentHandlers()
testBlockingPollApplicationAckDifferentHandlers, added an extra 1000 ms before testing callbacks.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback/acknowledge/CallbackAcknowledgeTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback/acknowledge/CallbackAcknowledgeTestCase.java 2008-05-22 04:16:14 UTC (rev 4222)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback/acknowledge/CallbackAcknowledgeTestCase.java 2008-05-22 04:20:49 UTC (rev 4223)
@@ -496,7 +496,7 @@
client.addListener(callbackHandler2, metadata);
assertEquals(0, TestInvocationHandler.callbacksAcknowledged);
client.invoke(APPLICATION_ACKNOWLEDGEMENT_TEST);
- Thread.sleep(2000);
+ Thread.sleep(3000);
assertEquals(2, callbackHandler1.callbacksReceived);
assertEquals(2, callbackHandler2.callbacksReceived);
assertEquals(4, TestInvocationHandler.callbacksAcknowledged);
16 years, 6 months
JBoss Remoting SVN: r4222 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/restart.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-22 00:16:14 -0400 (Thu, 22 May 2008)
New Revision: 4222
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/restart/ServerRestartTestParent.java
Log:
JBREM-930: Make multiple attempts to restart server.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/restart/ServerRestartTestParent.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/restart/ServerRestartTestParent.java 2008-05-22 04:06:46 UTC (rev 4221)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/restart/ServerRestartTestParent.java 2008-05-22 04:16:14 UTC (rev 4222)
@@ -108,8 +108,29 @@
// Restart server.
shutdownServer();
- setupServer(false);
+ // Retry if port remains unavailable.
+ for (int i = 0; i < 5; i++)
+ {
+ try
+ {
+ setupServer(false);
+ break;
+ }
+ catch (Exception e)
+ {
+ if (i < 4)
+ {
+ log.info("unable to restart server: will try again in 60 seconds: " + e.getMessage());
+ Thread.sleep(60000);
+ }
+ else
+ {
+ fail("unable to restart server: " + e.getMessage());
+ }
+ }
+ }
+
// Test connection.
assertEquals("xyz", client.invoke("xyz"));
log.info("second connection is good");
16 years, 6 months
JBoss Remoting SVN: r4221 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/oneway.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-22 00:06:46 -0400 (Thu, 22 May 2008)
New Revision: 4221
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/oneway/OnewayThreadPoolTestCase.java
Log:
JBREM-930: In testHeavyLoadClientSideHttp() changed "maxThreads" to "maxProcessors".
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/oneway/OnewayThreadPoolTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/oneway/OnewayThreadPoolTestCase.java 2008-05-22 04:02:19 UTC (rev 4220)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/oneway/OnewayThreadPoolTestCase.java 2008-05-22 04:06:46 UTC (rev 4221)
@@ -320,7 +320,7 @@
String host = InetAddress.getLocalHost().getHostAddress();
int port = PortUtil.findFreePort(host);
String locatorURI = "http://" + host + ":" + port;
- locatorURI += "/?maxThreads=400";
+ locatorURI += "/?maxProcessors=400";
InvokerLocator locator = new InvokerLocator(locatorURI);
Connector connector = new Connector(locator);
connector.create();
16 years, 6 months
JBoss Remoting SVN: r4220 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback/acknowledge.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-22 00:02:19 -0400 (Thu, 22 May 2008)
New Revision: 4220
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback/acknowledge/CallbackAcknowledgeTestCase.java
Log:
JBREM-930: In testNonblockingPollApplicationAckDifferentHandlers(), added an extra 1000 ms before testing callbacks.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback/acknowledge/CallbackAcknowledgeTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback/acknowledge/CallbackAcknowledgeTestCase.java 2008-05-22 03:48:57 UTC (rev 4219)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/callback/acknowledge/CallbackAcknowledgeTestCase.java 2008-05-22 04:02:19 UTC (rev 4220)
@@ -450,7 +450,7 @@
client.addListener(callbackHandler2, metadata);
assertEquals(0, TestInvocationHandler.callbacksAcknowledged);
client.invoke(APPLICATION_ACKNOWLEDGEMENT_TEST);
- Thread.sleep(1000);
+ Thread.sleep(2000);
assertEquals(2, callbackHandler1.callbacksReceived);
assertEquals(2, callbackHandler2.callbacksReceived);
assertEquals(4, TestInvocationHandler.callbacksAcknowledged);
16 years, 6 months
JBoss Remoting SVN: r4219 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/performance/synchronous.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2008-05-21 23:48:57 -0400 (Wed, 21 May 2008)
New Revision: 4219
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/performance/synchronous/Payload.java
Log:
JBREM-982: readExternal() and writeExternal() use byte arrays.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/performance/synchronous/Payload.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/performance/synchronous/Payload.java 2008-05-22 03:45:41 UTC (rev 4218)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/performance/synchronous/Payload.java 2008-05-22 03:48:57 UTC (rev 4219)
@@ -87,11 +87,11 @@
int size = in.readInt();
byte[] bytes = new byte[size];
- for(int i = 0; i < size; i++)
+ int n = 0;
+ while (n < size)
{
- bytes[i] = in.readByte();
+ n += in.read(bytes, n, size - n);
}
-
this.payload = bytes;
}
@@ -115,10 +115,6 @@
out.writeInt(callNumber);
byte[] bytes = (byte[]) payload;
out.writeInt(bytes.length);
-
- for(int i = 0; i < bytes.length; i++)
- {
- out.writeByte(bytes[i]);
- }
+ out.write(bytes, 0, bytes.length);
}
}
\ No newline at end of file
16 years, 6 months