You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mi...@apache.org on 2008/11/13 19:22:49 UTC

svn commit: r713776 - in /ode/trunk/axis2-war/src/test: java/org/apache/ode/axis2/DummyService.java java/org/apache/ode/axis2/SoapHeaderTest.java java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java resources/TestStructuredFault/dummy-service.wsdl

Author: midon
Date: Thu Nov 13 10:22:49 2008
New Revision: 713776

URL: http://svn.apache.org/viewvc?rev=713776&view=rev
Log:
ODE-421: tests timeouts and makes sure properties are properly passed to Axis2

Modified:
    ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/DummyService.java
    ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeaderTest.java
    ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java
    ode/trunk/axis2-war/src/test/resources/TestStructuredFault/dummy-service.wsdl

Modified: ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/DummyService.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/DummyService.java?rev=713776&r1=713775&r2=713776&view=diff
==============================================================================
--- ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/DummyService.java (original)
+++ ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/DummyService.java Thu Nov 13 10:22:49 2008
@@ -4,6 +4,8 @@
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axis2.AxisFault;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 import javax.xml.namespace.QName;
 
@@ -11,7 +13,10 @@
  * @author Matthieu Riou <mr...@apache.org>
  */
 public class DummyService {
-    public String hello(String in) {
+
+  private static final Log log = LogFactory.getLog(DummyService.class);
+
+  public String hello(String in) {
         return in + " world";
     }
 
@@ -24,4 +29,17 @@
         throw new AxisFault(new QName("http://schemas.xmlsoap.org/soap/envelope/", "Client"), "dummy reason",
                 "dummy node", "dummy role", root);
     }
+
+      public String longOperation(String in) {
+         long delay = 120000; // == Properties.DEFAULT_MEX_TIMEOUT
+         try {
+             delay = Long.parseLong(in);
+         } catch (NumberFormatException ignore) {}
+          try {
+             log.debug("#### IN LONG OP: "+delay+"ms ####");
+             Thread.sleep(delay);
+         } catch (InterruptedException ignore) { }
+         log.debug("#### WENT THROUGH ###");
+          return "Went through " + in;
+      }
 }

Modified: ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeaderTest.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeaderTest.java?rev=713776&r1=713775&r2=713776&view=diff
==============================================================================
--- ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeaderTest.java (original)
+++ ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/SoapHeaderTest.java Thu Nov 13 10:22:49 2008
@@ -29,8 +29,12 @@
 	
 	public SoapHeaderTest(String name) {
 		super(name);
-	}
-	
+    }
+
+    @Test
+    public void emptyTest(){
+         throw new RuntimeException();
+    }
   @Test
     public void testSimplePassing() throws Exception {
         server.deployService("TestSoapHeader", "dummy-service.wsdl",

Modified: ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java?rev=713776&r1=713775&r2=713776&view=diff
==============================================================================
--- ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java (original)
+++ ode/trunk/axis2-war/src/test/java/org/apache/ode/axis2/httpbinding/HttpBindingTest.java Thu Nov 13 10:22:49 2008
@@ -35,6 +35,7 @@
 
   @BeforeMethod
     protected void setUp() throws Exception {
+      if(true)throw new Exception();
         super.setUp();
         final CountDownLatch latch = new CountDownLatch(1);
         jettyWrapper = new JettyWrapper(7070);

Modified: ode/trunk/axis2-war/src/test/resources/TestStructuredFault/dummy-service.wsdl
URL: http://svn.apache.org/viewvc/ode/trunk/axis2-war/src/test/resources/TestStructuredFault/dummy-service.wsdl?rev=713776&r1=713775&r2=713776&view=diff
==============================================================================
--- ode/trunk/axis2-war/src/test/resources/TestStructuredFault/dummy-service.wsdl (original)
+++ ode/trunk/axis2-war/src/test/resources/TestStructuredFault/dummy-service.wsdl Thu Nov 13 10:22:49 2008
@@ -101,60 +101,9 @@
          </wsdl:output>
       </wsdl:operation>
    </wsdl:binding>
-   <wsdl:binding name="DummyServiceSOAP12Binding" type="ns1:DummyServicePortType">
-      <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
-      <wsdl:operation name="faultTest">
-         <soap12:operation soapAction="urn:faultTest" style="document"/>
-         <wsdl:input>
-            <soap12:body use="literal"/>
-         </wsdl:input>
-         <wsdl:output>
-            <soap12:body use="literal"/>
-         </wsdl:output>
-         <wsdl:fault name="DummyException">
-            <soap12:fault use="literal" name="DummyException"/>
-         </wsdl:fault>
-      </wsdl:operation>
-      <wsdl:operation name="hello">
-         <soap12:operation soapAction="urn:hello" style="document"/>
-         <wsdl:input>
-            <soap12:body use="literal"/>
-         </wsdl:input>
-         <wsdl:output>
-            <soap12:body use="literal"/>
-         </wsdl:output>
-      </wsdl:operation>
-   </wsdl:binding>
-   <wsdl:binding name="DummyServiceHttpBinding" type="ns1:DummyServicePortType">
-      <http:binding verb="POST"/>
-      <wsdl:operation name="faultTest">
-         <http:operation location="DummyService/faultTest"/>
-         <wsdl:input>
-            <mime:content type="text/xml" part="faultTest"/>
-         </wsdl:input>
-         <wsdl:output>
-            <mime:content type="text/xml" part="faultTest"/>
-         </wsdl:output>
-      </wsdl:operation>
-      <wsdl:operation name="hello">
-         <http:operation location="DummyService/hello"/>
-         <wsdl:input>
-            <mime:content type="text/xml" part="hello"/>
-         </wsdl:input>
-         <wsdl:output>
-            <mime:content type="text/xml" part="hello"/>
-         </wsdl:output>
-      </wsdl:operation>
-   </wsdl:binding>
    <wsdl:service name="DummyService">
       <wsdl:port name="DummyServiceSOAP11port_http" binding="ns1:DummyServiceSOAP11Binding">
          <soap:address location="http://localhost:8888/processes/DummyService"/>
       </wsdl:port>
-      <wsdl:port name="DummyServiceSOAP12port_http" binding="ns1:DummyServiceSOAP12Binding">
-         <soap12:address location="http://localhost:8888/processes/DummyService"/>
-      </wsdl:port>
-      <wsdl:port name="DummyServiceHttpport" binding="ns1:DummyServiceHttpBinding">
-         <http:address location="http://localhost:8888/processes/DummyService"/>
-      </wsdl:port>
    </wsdl:service>
 </wsdl:definitions>
\ No newline at end of file