[jboss-cvs] JBossRemoting/src/tests/org/jboss/test/remoting/versioning/transport/http ...

Tom Elrod tom.elrod at jboss.com
Tue Jul 25 15:52:22 EDT 2006


  User: telrod  
  Date: 06/07/25 15:52:22

  Modified:    src/tests/org/jboss/test/remoting/versioning/transport/http  
                        VersionHTTPInvokerTestCase.java
  Added:       src/tests/org/jboss/test/remoting/versioning/transport/http  
                        VersionHTTPInvokerTestClient.java
  Log:
  JBREM-556 - fixed some problems with remoting versioning.
  
  Revision  Changes    Path
  1.2       +1 -1      JBossRemoting/src/tests/org/jboss/test/remoting/versioning/transport/http/VersionHTTPInvokerTestCase.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: VersionHTTPInvokerTestCase.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/tests/org/jboss/test/remoting/versioning/transport/http/VersionHTTPInvokerTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- VersionHTTPInvokerTestCase.java	27 Mar 2006 22:47:02 -0000	1.1
  +++ VersionHTTPInvokerTestCase.java	25 Jul 2006 19:52:22 -0000	1.2
  @@ -9,7 +9,7 @@
   {
      public void declareTestClasses()
      {
  -      addTestClasses("org.jboss.test.remoting.transport.http.HTTPInvokerTestClient",
  +      addTestClasses("org.jboss.test.remoting.versioning.transport.http.VersionHTTPInvokerTestClient",
                        1,
                        "org.jboss.test.remoting.transport.http.HTTPInvokerTestServer");
      }
  
  
  
  1.1      date: 2006/07/25 19:52:22;  author: telrod;  state: Exp;JBossRemoting/src/tests/org/jboss/test/remoting/versioning/transport/http/VersionHTTPInvokerTestClient.java
  
  Index: VersionHTTPInvokerTestClient.java
  ===================================================================
  /*
  * 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.versioning.transport.http;
  
  import org.jboss.remoting.Client;
  import org.jboss.remoting.transport.http.HTTPMetadataConstants;
  import org.jboss.test.remoting.transport.http.HTTPInvokerTestClient;
  import org.jboss.test.remoting.transport.web.WebInvocationHandler;
  
  import java.util.Map;
  
  /**
   * @author <a href="mailto:tom.elrod at jboss.com">Tom Elrod</a>
   */
  public class VersionHTTPInvokerTestClient extends HTTPInvokerTestClient
  {
     protected void makeExceptionInvocation(Client remotingClient, Map metadata)
           throws Throwable
     {
        // as of 2.0.0.CR1, would throw exception by default from the client if did not have
        // following metadata property.  Since would not be present in older versions, will only
        // test when response is the exception (in older versions the property set will just be ignored
        metadata.put(HTTPMetadataConstants.NO_THROW_ON_ERROR, "true");
        Object response = remotingClient.invoke(WebInvocationHandler.THROW_EXCEPTION_PARAM, metadata);
        if (response instanceof Exception)
        {
           System.out.println("Return from invocation is of type Exception as expected.");
           assertTrue("Received exception return as expected.", true);
        }
        else
        {
           System.out.println("Did not get Exception type returned as expected.");
           assertTrue("Should have received Exception as return.", false);
        }
     }
  
  
     protected void checkUserAgent(Client remotingClient, Map metadata)
           throws Throwable
     {
        // this is going to be no-op since in 1.4.x version, just returned
        // java version as the agent and not jboss remoting.
     }
  
  
  }
  
  



More information about the jboss-cvs-commits mailing list