[jboss-remoting-commits] JBoss Remoting SVN: r5181 - in remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet: preservelines and 1 other directory.
jboss-remoting-commits at lists.jboss.org
jboss-remoting-commits at lists.jboss.org
Sun May 10 02:40:45 EDT 2009
Author: ron.sigal at jboss.com
Date: 2009-05-10 02:40:41 -0400 (Sun, 10 May 2009)
New Revision: 5181
Added:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/ServletLinePreservationTestClient.java
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/TestInvocationHandler.java
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/readme.txt
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/remoting-servlet-service.xml
Log:
JBREM-1079: New unit tests.
Added: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/ServletLinePreservationTestClient.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/ServletLinePreservationTestClient.java (rev 0)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/ServletLinePreservationTestClient.java 2009-05-10 06:40:41 UTC (rev 5181)
@@ -0,0 +1,51 @@
+/*
+* 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.servlet.preservelines;
+
+import org.jboss.remoting.InvokerLocator;
+import org.jboss.test.remoting.transport.http.lines.HttpLinePreservationTestCase;
+
+
+/**
+ * Unit tests for JBREM-809.
+ *
+ * @author <a href="ron.sigal at jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.1 $
+ * <p>
+ * Copyright Feb 8, 2008
+ * </p>
+ */
+public class ServletLinePreservationTestClient extends HttpLinePreservationTestCase
+{
+ protected String getTransport()
+ {
+ return "servlet";
+ }
+
+ protected void setupServer(boolean addConfig, String preserveLines) throws Exception
+ {
+ locatorURI = "servlet://localhost:8080/servlet-invoker/ServerInvokerServlet";
+ serverLocator = new InvokerLocator(locatorURI);
+ }
+
+ public void testPreservationClientNoPreservationServer() {}
+}
\ No newline at end of file
Added: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/TestInvocationHandler.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/TestInvocationHandler.java (rev 0)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/TestInvocationHandler.java 2009-05-10 06:40:41 UTC (rev 5181)
@@ -0,0 +1,51 @@
+/*
+* 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.servlet.preservelines;
+
+import javax.management.MBeanServer;
+
+import org.jboss.remoting.InvocationRequest;
+import org.jboss.remoting.ServerInvocationHandler;
+import org.jboss.remoting.ServerInvoker;
+import org.jboss.remoting.callback.InvokerCallbackHandler;
+
+/**
+ * For JBREM-809.
+ *
+ * @author <a href="ron.sigal at jboss.com">Ron Sigal</a>
+ * @version $Revision: 1.1 $
+ * <p>
+ * Copyright Feb 8, 2008
+ * </p>
+ */
+public class TestInvocationHandler implements ServerInvocationHandler
+{
+ public void addListener(InvokerCallbackHandler callbackHandler) {}
+ public Object invoke(final InvocationRequest invocation) throws Throwable
+ {
+ return invocation.getParameter();
+ }
+ public void removeListener(InvokerCallbackHandler callbackHandler) {}
+ public void setMBeanServer(MBeanServer server) {}
+ public void setInvoker(ServerInvoker invoker) {}
+}
\ No newline at end of file
Added: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/readme.txt
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/readme.txt (rev 0)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/readme.txt 2009-05-10 06:40:41 UTC (rev 5181)
@@ -0,0 +1,40 @@
+The servlet (and sslservlet) transport tests require a web container. Currently, these tests have to be run
+manually (JBREM-139 has been created to automate this). Until then, here are the instructions for running
+the tests manually.
+
+*******************************************************
+***** JBREM-139 is done. *****
+***** See tests.functional.servlet in build.xml. *****
+*******************************************************
+
+servlet
+
+1. Get JBossAS and copy remoting's servlet-invoker.war (from distro or build) to the deploy directory.
+2. Copy the WEB-INF/web.xml under this directory into the that of the servlet-invoker.war/WEB-INF directory.
+3. Copy remoting-servlet-invoker-service.xml to deploy directory.
+4. Copy jboss-remoting-tests.jar to server lib directory
+5. Start web container (JBossAS).
+6. Run ServletLinePreservationTestClient.
+
+
+sslservlet
+
+1. Steps 1-4 above, except use the WEB-INF/web.xml and remoting-servlet-invoker-service.xml that is under the
+servlet/ssl directory.
+2. Copy the servlet/ssl/.keystore file to the server conf directory
+3. Edit jboss-web.deployer/server.xml to enable ssl connector. It should look like following:
+
+ <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
+ maxThreads="150"
+ scheme="https" secure="true" clientAuth="false"
+ address="${jboss.bind.address}"
+ keystoreFile="${jboss.server.home.dir}/conf/.keystore"
+ keystorePass="unit-tests-server"
+ sslProtocol="TLS"/>
+
+
+4. Start web container (JBossAS).
+5. Run SSLServletInvokerTestClient or SSLServletClientAddressTestClient.
+
+
+
Added: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/remoting-servlet-service.xml
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/remoting-servlet-service.xml (rev 0)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet/preservelines/remoting-servlet-service.xml 2009-05-10 06:40:41 UTC (rev 5181)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<server>
+ <mbean code="org.jboss.remoting.transport.Connector"
+ name="jboss.remoting:service=Connector,transport=Servlet"
+ display-name="Servlet transport Connector">
+
+ <attribute name="Configuration">
+ <config>
+ <invoker transport="servlet">
+ <attribute name="serverBindAddress">localhost</attribute>
+ <attribute name="serverBindPort">8080</attribute>
+ <attribute name="preserveLines" isParam="true">true</attribute>
+ <attribute name="path">servlet-invoker/ServerInvokerServlet</attribute>
+ </invoker>
+ <handlers>
+ <handler subsystem="test">org.jboss.test.remoting.transport.servlet.preservelines.TestInvocationHandler</handler>
+ </handlers>
+ </config>
+ </attribute>
+ </mbean>
+</server>
More information about the jboss-remoting-commits
mailing list