Author: ron.sigal(a)jboss.com
Date: 2009-04-30 01:27:56 -0400 (Thu, 30 Apr 2009)
New Revision: 5093
Modified:
remoting2/branches/2.2.2-SP11_JBREM-1112/src/tests/org/jboss/test/remoting/connection/ConnectionValidatorDisconnectTimeoutTestCase.java
Log:
JBREM-1112: Removed test methods that depend on (non-existent) Client.USE_ALL_PARAMS.
Modified:
remoting2/branches/2.2.2-SP11_JBREM-1112/src/tests/org/jboss/test/remoting/connection/ConnectionValidatorDisconnectTimeoutTestCase.java
===================================================================
---
remoting2/branches/2.2.2-SP11_JBREM-1112/src/tests/org/jboss/test/remoting/connection/ConnectionValidatorDisconnectTimeoutTestCase.java 2009-04-28
01:13:55 UTC (rev 5092)
+++
remoting2/branches/2.2.2-SP11_JBREM-1112/src/tests/org/jboss/test/remoting/connection/ConnectionValidatorDisconnectTimeoutTestCase.java 2009-04-30
05:27:56 UTC (rev 5093)
@@ -216,89 +216,89 @@
}
- public void testZeroInvokerLocator() throws Throwable
- {
- log.info("entering " + getName());
-
- // Start server.
- setupServer();
-
- // Create client.
- String clientLocatorURI = locatorURI;
- clientLocatorURI += "/?" + Client.USE_ALL_PARAMS + "=true";
- clientLocatorURI += "&" +
ConnectionValidator.FAILURE_DISCONNECT_TIMEOUT + "=0";
- InvokerLocator clientLocator = new InvokerLocator(clientLocatorURI);
- HashMap clientConfig = new HashMap();
- clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
- clientConfig.put(Client.ENABLE_LEASE, "true");
- addExtraClientConfig(clientConfig);
- Client client = new Client(clientLocator, clientConfig);
- client.connect();
- log.info("client is connected");
-
- // Test connections.
- assertEquals("abc", client.invoke("abc"));
- log.info("connection is good");
-
- // Install ConnectionListener.
- TestConnectionListener clientConnectionListener = new
TestConnectionListener("CLIENT");
- client.addConnectionListener(clientConnectionListener, new HashMap());
-
- // Wait for broken connection and test.
- Thread.sleep(8000);
- assertTrue(serverConnectionListener.notified);
- assertNull(serverConnectionListener.throwable);
- assertTrue(clientConnectionListener.notified);
- assertTrue(clientConnectionListener.throwable instanceof Exception);
- assertEquals("Could not connect to server!",
((Exception)clientConnectionListener.throwable).getMessage());
-
- client.removeConnectionListener(clientConnectionListener);
- client.disconnect();
- shutdownServer();
- log.info(getName() + " PASSES");
- }
+// public void testZeroInvokerLocator() throws Throwable
+// {
+// log.info("entering " + getName());
+//
+// // Start server.
+// setupServer();
+//
+// // Create client.
+// String clientLocatorURI = locatorURI;
+// clientLocatorURI += "/?" + Client.USE_ALL_PARAMS + "=true";
+// clientLocatorURI += "&" +
ConnectionValidator.FAILURE_DISCONNECT_TIMEOUT + "=0";
+// InvokerLocator clientLocator = new InvokerLocator(clientLocatorURI);
+// HashMap clientConfig = new HashMap();
+// clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+// clientConfig.put(Client.ENABLE_LEASE, "true");
+// addExtraClientConfig(clientConfig);
+// Client client = new Client(clientLocator, clientConfig);
+// client.connect();
+// log.info("client is connected");
+//
+// // Test connections.
+// assertEquals("abc", client.invoke("abc"));
+// log.info("connection is good");
+//
+// // Install ConnectionListener.
+// TestConnectionListener clientConnectionListener = new
TestConnectionListener("CLIENT");
+// client.addConnectionListener(clientConnectionListener, new HashMap());
+//
+// // Wait for broken connection and test.
+// Thread.sleep(8000);
+// assertTrue(serverConnectionListener.notified);
+// assertNull(serverConnectionListener.throwable);
+// assertTrue(clientConnectionListener.notified);
+// assertTrue(clientConnectionListener.throwable instanceof Exception);
+// assertEquals("Could not connect to server!",
((Exception)clientConnectionListener.throwable).getMessage());
+//
+// client.removeConnectionListener(clientConnectionListener);
+// client.disconnect();
+// shutdownServer();
+// log.info(getName() + " PASSES");
+// }
- public void testNonZeroInvokerLocator() throws Throwable
- {
- log.info("entering " + getName());
-
- // Start server.
- setupServer();
-
- // Create client.
- String clientLocatorURI = locatorURI;
- clientLocatorURI += "/?" + Client.USE_ALL_PARAMS + "=true";
- clientLocatorURI += "&" +
ConnectionValidator.FAILURE_DISCONNECT_TIMEOUT + "=10000";
- InvokerLocator clientLocator = new InvokerLocator(clientLocatorURI);
- HashMap clientConfig = new HashMap();
- clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
- clientConfig.put(Client.ENABLE_LEASE, "true");
- addExtraClientConfig(clientConfig);
- Client client = new Client(clientLocator, clientConfig);
- client.connect();
- log.info("client is connected");
-
- // Test connections.
- assertEquals("abc", client.invoke("abc"));
- log.info("connection is good");
-
- // Install ConnectionListener.
- TestConnectionListener clientConnectionListener = new
TestConnectionListener("CLIENT");
- client.addConnectionListener(clientConnectionListener, new HashMap());
-
- // Wait for broken connection and test.
- Thread.sleep(4000);
- assertTrue(serverConnectionListener.notified);
- assertTrue(serverConnectionListener.throwable instanceof
ClientDisconnectedException);
- assertTrue(clientConnectionListener.notified);
- assertTrue(clientConnectionListener.throwable instanceof Exception);
- assertEquals("Could not connect to server!",
((Exception)clientConnectionListener.throwable).getMessage());
-
- client.disconnect();
- shutdownServer();
- log.info(getName() + " PASSES");
- }
+// public void testNonZeroInvokerLocator() throws Throwable
+// {
+// log.info("entering " + getName());
+//
+// // Start server.
+// setupServer();
+//
+// // Create client.
+// String clientLocatorURI = locatorURI;
+// clientLocatorURI += "/?" + Client.USE_ALL_PARAMS + "=true";
+// clientLocatorURI += "&" +
ConnectionValidator.FAILURE_DISCONNECT_TIMEOUT + "=10000";
+// InvokerLocator clientLocator = new InvokerLocator(clientLocatorURI);
+// HashMap clientConfig = new HashMap();
+// clientConfig.put(InvokerLocator.FORCE_REMOTE, "true");
+// clientConfig.put(Client.ENABLE_LEASE, "true");
+// addExtraClientConfig(clientConfig);
+// Client client = new Client(clientLocator, clientConfig);
+// client.connect();
+// log.info("client is connected");
+//
+// // Test connections.
+// assertEquals("abc", client.invoke("abc"));
+// log.info("connection is good");
+//
+// // Install ConnectionListener.
+// TestConnectionListener clientConnectionListener = new
TestConnectionListener("CLIENT");
+// client.addConnectionListener(clientConnectionListener, new HashMap());
+//
+// // Wait for broken connection and test.
+// Thread.sleep(4000);
+// assertTrue(serverConnectionListener.notified);
+// assertTrue(serverConnectionListener.throwable instanceof
ClientDisconnectedException);
+// assertTrue(clientConnectionListener.notified);
+// assertTrue(clientConnectionListener.throwable instanceof Exception);
+// assertEquals("Could not connect to server!",
((Exception)clientConnectionListener.throwable).getMessage());
+//
+// client.disconnect();
+// shutdownServer();
+// log.info(getName() + " PASSES");
+// }
public void testZeroConfig() throws Throwable