[jboss-cvs] JBossRemoting/src/tests/org/jboss/test/remoting/transport/bisocket/timeout ...
Ron Sigal
ron_sigal at yahoo.com
Fri Aug 31 20:03:31 EDT 2007
User: rsigal
Date: 07/08/31 20:03:31
Added: src/tests/org/jboss/test/remoting/transport/bisocket/timeout
Tag: remoting_2_x
BisocketQuickDisconnectTestCase.java
BisocketQuickDisconnectServer.java
BisocketQuickDisconnectClient.java
Log:
JBREM-757: Added unit tests for bisocket transport.
Revision Changes Path
No revision
No revision
1.1.2.1 +42 -0 JBossRemoting/src/tests/org/jboss/test/remoting/transport/bisocket/timeout/Attic/BisocketQuickDisconnectTestCase.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: BisocketQuickDisconnectTestCase.java
===================================================================
RCS file: BisocketQuickDisconnectTestCase.java
diff -N BisocketQuickDisconnectTestCase.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ BisocketQuickDisconnectTestCase.java 1 Sep 2007 00:03:31 -0000 1.1.2.1
@@ -0,0 +1,42 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.test.remoting.transport.bisocket.timeout;
+
+import org.jboss.jrunit.harness.TestDriver;
+
+/**
+ * @author <a href="mailto:tom.elrod at jboss.com">Tom Elrod</a>
+ */
+public class BisocketQuickDisconnectTestCase extends TestDriver
+{
+ public void declareTestClasses()
+ {
+ addTestClasses(BisocketQuickDisconnectClient.class.getName(),
+ 1,
+ BisocketQuickDisconnectServer.class.getName());
+ }
+ protected long getResultsTimeout()
+ {
+ return 100000;
+ }
+}
\ No newline at end of file
1.1.2.1 +53 -0 JBossRemoting/src/tests/org/jboss/test/remoting/transport/bisocket/timeout/Attic/BisocketQuickDisconnectServer.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: BisocketQuickDisconnectServer.java
===================================================================
RCS file: BisocketQuickDisconnectServer.java
diff -N BisocketQuickDisconnectServer.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ BisocketQuickDisconnectServer.java 1 Sep 2007 00:03:31 -0000 1.1.2.1
@@ -0,0 +1,53 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.remoting.transport.bisocket.timeout;
+
+import org.jboss.test.remoting.timeout.QuickDisconnectServerParent;
+
+/**
+ * @author <a href="ron.sigal at jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.1.2.1 $
+ * <p>
+ * Copyright Feb 18, 2007
+ * </p>
+ */
+public class BisocketQuickDisconnectServer extends QuickDisconnectServerParent
+{
+ public static void main(String[] args)
+ {
+ try
+ {
+ BisocketQuickDisconnectServer server = new BisocketQuickDisconnectServer();
+ server.setUp();
+ Thread.sleep(100000);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+
+ protected String getTransport()
+ {
+ return "bisocket";
+ }
+}
1.1.2.1 +54 -0 JBossRemoting/src/tests/org/jboss/test/remoting/transport/bisocket/timeout/Attic/BisocketQuickDisconnectClient.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: BisocketQuickDisconnectClient.java
===================================================================
RCS file: BisocketQuickDisconnectClient.java
diff -N BisocketQuickDisconnectClient.java
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ BisocketQuickDisconnectClient.java 1 Sep 2007 00:03:31 -0000 1.1.2.1
@@ -0,0 +1,54 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.remoting.transport.bisocket.timeout;
+
+import org.jboss.test.remoting.timeout.QuickDisconnectClientParent;
+
+
+/**
+ * @author <a href="ron.sigal at jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.1.2.1 $
+ * <p>
+ * Copyright Feb 17, 2007
+ * </p>
+ */
+public class BisocketQuickDisconnectClient extends QuickDisconnectClientParent
+{
+ protected String getTransport()
+ {
+ return "bisocket";
+ }
+
+ /**
+ * It seems that in jdk 1.4 (at least), HttpURLConnection has a default timeout
+ * of 1000 ms, so the tests are run with a shorter timeout.
+ */
+ protected int shortTimeout()
+ {
+ return 500;
+ }
+
+ protected String shortTimeoutString()
+ {
+ return "500";
+ }
+}
More information about the jboss-cvs-commits
mailing list