You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by gd...@apache.org on 2001/10/17 20:24:10 UTC

cvs commit: xml-axis/java/test/functional TestAddressBookSample.java TestBidBuySample.java TestEchoSample.java TestMiscSample.java TestProxySample.java TestStockSample.java TestTCPTransportSample.java TestTransportSample.java

gdaniels    01/10/17 11:24:10

  Modified:    java/test/functional TestAddressBookSample.java
                        TestBidBuySample.java TestEchoSample.java
                        TestMiscSample.java TestProxySample.java
                        TestStockSample.java TestTCPTransportSample.java
                        TestTransportSample.java
  Log:
  Switch output to log4j's INFO priority to make tests less chatty.
  
  Revision  Changes    Path
  1.6       +9 -5      xml-axis/java/test/functional/TestAddressBookSample.java
  
  Index: TestAddressBookSample.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/TestAddressBookSample.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestAddressBookSample.java	2001/09/05 17:23:01	1.5
  +++ TestAddressBookSample.java	2001/10/17 18:24:10	1.6
  @@ -66,6 +66,7 @@
   import org.apache.axis.utils.QName ;
   import org.apache.axis.encoding.ServiceDescription;
   import org.apache.axis.encoding.SOAPTypeMappingRegistry;
  +import org.apache.log4j.Category;
   
   import junit.framework.TestCase;
   
  @@ -74,7 +75,10 @@
   /** Test the address book sample code.
    */
   public class TestAddressBookSample extends TestCase {
  -    
  +    static Category category =
  +            Category.getInstance(TestAddressBookSample.class.getName());
  +
  +
       public TestAddressBookSample(String name) {
           super(name);
       }
  @@ -91,12 +95,12 @@
       
       public void testAddressBookService () throws Exception {
           try {
  -            System.out.println("Testing address book sample.");
  -            System.out.println("Testing deployment...");
  +            category.info("Testing address book sample.");
  +            category.info("Testing deployment...");
               doTestDeploy();
  -            System.out.println("Testing service...");
  +            category.info("Testing service...");
               doTest();
  -            System.out.println("Test complete.");
  +            category.info("Test complete.");
           }
           catch( Exception e ) {
               if ( e instanceof AxisFault ) ((AxisFault)e).dump();
  
  
  
  1.5       +8 -5      xml-axis/java/test/functional/TestBidBuySample.java
  
  Index: TestBidBuySample.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/TestBidBuySample.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestBidBuySample.java	2001/09/05 17:23:01	1.4
  +++ TestBidBuySample.java	2001/10/17 18:24:10	1.5
  @@ -66,6 +66,7 @@
   import org.apache.axis.utils.QName ;
   import org.apache.axis.encoding.ServiceDescription;
   import org.apache.axis.encoding.SOAPTypeMappingRegistry;
  +import org.apache.log4j.Category;
   
   import junit.framework.TestCase;
   
  @@ -74,7 +75,9 @@
   /** Test the stock sample code.
    */
   public class TestBidBuySample extends TestCase {
  -    
  +    static Category category =
  +            Category.getInstance(TestBidBuySample.class.getName());
  +
       public TestBidBuySample(String name) {
           super(name);
       }
  @@ -91,12 +94,12 @@
       
       public void testBidBuyService () throws Exception {
           try {
  -            System.out.println("Testing bidbuy sample.");
  -            System.out.println("Testing deployment...");
  +            category.info("Testing bidbuy sample.");
  +            category.info("Testing deployment...");
               doTestDeploy();
  -            System.out.println("Testing service...");
  +            category.info("Testing service...");
               doTest();
  -            System.out.println("Test complete.");
  +            category.info("Test complete.");
           }
           catch( Exception e ) {
               if ( e instanceof AxisFault ) ((AxisFault)e).dump();
  
  
  
  1.5       +6 -3      xml-axis/java/test/functional/TestEchoSample.java
  
  Index: TestEchoSample.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/TestEchoSample.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestEchoSample.java	2001/10/17 16:36:15	1.4
  +++ TestEchoSample.java	2001/10/17 18:24:10	1.5
  @@ -57,13 +57,16 @@
   
   import junit.framework.TestCase;
   import org.apache.axis.client.AdminClient;
  +import org.apache.log4j.Category;
   
   import samples.echo.TestClient;
   
   /** Test the stock sample code.
    */
   public class TestEchoSample extends TestCase {
  -    
  +    static Category category =
  +            Category.getInstance(TestEchoSample.class.getName());
  +
       public TestEchoSample(String name) {
           super(name);
       }
  @@ -74,7 +77,7 @@
       }
   
       public void testEchoService () throws Exception {
  -        System.out.println("Testing echo interop sample.");
  +        category.info("Testing echo interop sample.");
   
           // deploy the echo service
           String[] args = {"-l", "local:", "samples/echo/deploy.xml"};
  @@ -91,7 +94,7 @@
           client.setURL("local:");
           client.execute();
   
  -        System.out.println("Test complete.");
  +        category.info("Test complete.");
       }
   }
   
  
  
  
  1.4       +7 -4      xml-axis/java/test/functional/TestMiscSample.java
  
  Index: TestMiscSample.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/TestMiscSample.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestMiscSample.java	2001/09/05 17:23:01	1.3
  +++ TestMiscSample.java	2001/10/17 18:24:10	1.4
  @@ -65,6 +65,7 @@
   import org.apache.axis.utils.QName ;
   import org.apache.axis.encoding.ServiceDescription;
   import org.apache.axis.encoding.SOAPTypeMappingRegistry;
  +import org.apache.log4j.Category;
   
   import junit.framework.TestCase;
   
  @@ -73,7 +74,9 @@
   /** Test the stock sample code.
    */
   public class TestMiscSample extends TestCase {
  -    
  +    static Category category =
  +            Category.getInstance(TestMiscSample.class.getName());
  +
       public TestMiscSample(String name) {
           super(name);
       }
  @@ -85,10 +88,10 @@
       
       public void testService () throws Exception {
           try {
  -            System.out.println("Testing misc sample.");
  -            System.out.println("Testing service...");
  +            category.info("Testing misc sample.");
  +            category.info("Testing service...");
               doTest();
  -            System.out.println("Test complete.");
  +            category.info("Test complete.");
           }
           catch( Exception e ) {
               if ( e instanceof AxisFault ) ((AxisFault)e).dump();
  
  
  
  1.4       +9 -6      xml-axis/java/test/functional/TestProxySample.java
  
  Index: TestProxySample.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/TestProxySample.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestProxySample.java	2001/09/05 17:23:01	1.3
  +++ TestProxySample.java	2001/10/17 18:24:10	1.4
  @@ -64,6 +64,7 @@
   import org.apache.axis.utils.Options ;
   import org.apache.axis.client.AdminClient;
   import org.apache.axis.client.ServiceClient;
  +import org.apache.log4j.Category;
   
   import junit.framework.TestCase;
   
  @@ -72,7 +73,9 @@
   /** Test the proxy sample code.
    */
   public class TestProxySample extends TestCase {
  -    
  +    static Category category =
  +            Category.getInstance(TestProxySample.class.getName());
  +
       public TestProxySample(String name) {
           super(name);
       }
  @@ -89,23 +92,23 @@
       
       public void testService () throws Exception {
           try {
  -            System.out.println("Testing proxy sample.");
  +            category.info("Testing proxy sample.");
               
  -            System.out.println("Testing deployment...");
  +            category.info("Testing deployment...");
               
               // deploy the proxy service
               String[] args = { "samples/proxy/deploy.xml" };
               AdminClient.main(args);
               
  -            System.out.println("Testing server-side client deployment...");
  +            category.info("Testing server-side client deployment...");
               
               // deploy the proxy service
               String[] args2 = { "samples/proxy/client_deploy.xml" };
               AdminClient.main(args2);
               
  -            System.out.println("Testing service...");
  +            category.info("Testing service...");
               doTest();
  -            System.out.println("Test complete.");
  +            category.info("Test complete.");
           }
           catch( Exception e ) {
               if ( e instanceof AxisFault ) ((AxisFault)e).dump();
  
  
  
  1.10      +11 -8     xml-axis/java/test/functional/TestStockSample.java
  
  Index: TestStockSample.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/TestStockSample.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TestStockSample.java	2001/10/17 17:39:49	1.9
  +++ TestStockSample.java	2001/10/17 18:24:10	1.10
  @@ -66,6 +66,7 @@
   import org.apache.axis.utils.QName ;
   import org.apache.axis.encoding.ServiceDescription;
   import org.apache.axis.encoding.SOAPTypeMappingRegistry;
  +import org.apache.log4j.Category;
   
   import junit.framework.TestCase;
   
  @@ -74,7 +75,9 @@
   /** Test the stock sample code.
    */
   public class TestStockSample extends TestCase {
  -    
  +    static Category category =
  +            Category.getInstance(TestStockSample.class.getName());
  +
       public TestStockSample(String name) {
           super(name);
       }
  @@ -125,18 +128,18 @@
   
       public void testStockService () throws Exception {
           try {
  -            System.out.println("Testing stock sample.");
  -            System.out.println("Testing JWS...");
  +            category.info("Testing stock sample.");
  +            category.info("Testing JWS...");
               doTestStockJWS();
  -            System.out.println("Testing deployment...");
  +            category.info("Testing deployment...");
               doTestDeploy();
  -            System.out.println("Testing service...");
  +            category.info("Testing service...");
               doTestStock();
  -            System.out.println("Testing service with SOAPAction: \"\"...");
  +            category.info("Testing service with SOAPAction: \"\"...");
               doTestStockNoAction();
  -            System.out.println("Testing undeployment...");
  +            category.info("Testing undeployment...");
               doTestUndeploy();
  -            System.out.println("Test complete.");
  +            category.info("Test complete.");
           }
           catch( Exception e ) {
               if ( e instanceof AxisFault ) ((AxisFault)e).dump();
  
  
  
  1.7       +26 -23    xml-axis/java/test/functional/TestTCPTransportSample.java
  
  Index: TestTCPTransportSample.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/TestTCPTransportSample.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- TestTCPTransportSample.java	2001/10/17 17:43:01	1.6
  +++ TestTCPTransportSample.java	2001/10/17 18:24:10	1.7
  @@ -66,6 +66,7 @@
   import org.apache.axis.client.ServiceClient;
   import org.apache.axis.encoding.ServiceDescription;
   import org.apache.axis.encoding.SOAPTypeMappingRegistry;
  +import org.apache.log4j.Category;
   
   import junit.framework.TestCase;
   import junit.framework.AssertionFailedError;
  @@ -73,39 +74,41 @@
   /** Test the stock sample code.
    */
   public class TestTCPTransportSample extends TestCase {
  -    
  +    static Category category =
  +            Category.getInstance(TestTCPTransportSample.class.getName());
  +
       public TestTCPTransportSample(String name) {
           super(name);
       }
  -    
  +
       public void doTransportDeploy() throws Exception {
           String[] args = { "client", "samples/transport/tcp/deploy.xml" };
           Admin.main(args);
       }
  -    
  +
       public void doTestDeploy () throws Exception {
           String[] args = { "-ltcp://localhost:8088", "samples/transport/deploy.xml" };
           AdminClient.main(args);
       }
  -    
  +
       public void doTestUndeploy () throws Exception {
           String[] args = { "-ltcp://localhost:8088", "samples/stock/undeploy.xml" };
           AdminClient.main(args);
       }
  -    
  +
       public void doTestStock() throws Exception {
           try {
  -            System.out.println("Testing TCP stock service...");
  +            category.info("Testing TCP stock service...");
               String   symbol = "XXX"; // args[0] ;
   
               ServiceClient call   = new ServiceClient
                   ( new TCPTransport("localhost", "8088") );
  -            
  +
               // reconstruct URL
               ServiceDescription sd = new ServiceDescription("stockQuotes", true);
               sd.addOutputParam("return", SOAPTypeMappingRegistry.XSD_FLOAT);
               call.setServiceDescription(sd);
  -            
  +
               Float res = new Float(0.0F);
               //      for (int i=0; i<count; i++) {
               Object ret = call.invoke(
  @@ -119,7 +122,7 @@
                   throw new AssertionFailedError("Bad return value from TCP stock test: "+ret);
               }
           }
  -        
  +
           //    }
           catch( Exception e ) {
               if ( e instanceof AxisFault ) ((AxisFault)e).dump();
  @@ -127,28 +130,28 @@
               throw new AssertionFailedError("Fault returned from TCP stock test: "+e);
           }
       }
  -    
  +
       public void testTCPTransportSample () throws Exception {
           try {
  -            System.out.println("Testing TCP transport.");
  -            
  +            category.info("Testing TCP transport.");
  +
               System.out.print("Deploying TCP client transport...");
               doTransportDeploy();
  -            System.out.println("OK!");
  -            
  +            category.info("OK!");
  +
               System.out.print("Testing deployment...");
               doTestDeploy();
  -            System.out.println("OK!");
  -            
  +            category.info("OK!");
  +
               System.out.print("Testing service...");
               doTestStock();
  -            System.out.println("OK!");
  -            
  +            category.info("OK!");
  +
               System.out.print("Testing undeployment...");
               doTestUndeploy();
  -            System.out.println("OK!");
  -            
  -            System.out.println("Test complete.");
  +            category.info("OK!");
  +
  +            category.info("Test complete.");
           }
           catch( Exception e ) {
               if ( e instanceof AxisFault ) ((AxisFault)e).dump();
  @@ -156,7 +159,7 @@
               throw new AssertionFailedError("Fault returned from test: "+e);
           }
       }
  -    
  +
       public static void main(String [] args)
       {
         TestTCPTransportSample tester = new TestTCPTransportSample("TCP test");
  @@ -165,6 +168,6 @@
         } catch (Exception e) {
         }
       }
  -    
  +
   }
   
  
  
  
  1.12      +12 -9     xml-axis/java/test/functional/TestTransportSample.java
  
  Index: TestTransportSample.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/test/functional/TestTransportSample.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- TestTransportSample.java	2001/09/05 17:23:01	1.11
  +++ TestTransportSample.java	2001/10/17 18:24:10	1.12
  @@ -69,13 +69,16 @@
   import junit.framework.TestCase;
   
   import org.apache.axis.utils.Admin;
  +import org.apache.log4j.Category;
   
   import samples.transport.FileTest;
   
   /** Test the stock sample code.
    */
   public class TestTransportSample extends TestCase {
  -    
  +    static Category category =
  +            Category.getInstance(TestTransportSample.class.getName());
  +
       public TestTransportSample(String name) {
           super(name);
       }
  @@ -103,9 +106,9 @@
               if (fault == null) throw e;
               if (fault.indexOf("java.net.UnknownHost")<0) {
                   int start = fault.indexOf(": ");
  -                System.out.println(fault.substring(start+2));
  +                category.info(fault.substring(start+2));
               } else if (fault.equals("timeout")) {
  -                System.out.println("timeout");
  +                category.info("timeout");
               } else {
                   throw e;
               }
  @@ -119,16 +122,16 @@
       
       public void testService () throws Exception {
           try {
  -            System.out.println("Testing transport sample.");
  -            System.out.println("Testing client deployment...");
  +            category.info("Testing transport sample.");
  +            category.info("Testing client deployment...");
               doTestClientDeploy();
  -            System.out.println("Testing deployment...");
  +            category.info("Testing deployment...");
               doTestDeploy();
  -            System.out.println("Testing service with symbol IBM...");
  +            category.info("Testing service with symbol IBM...");
               doTestIBM();
  -            System.out.println("Testing service with symbol XXX...");
  +            category.info("Testing service with symbol XXX...");
               doTestXXX();
  -            System.out.println("Test complete.");
  +            category.info("Test complete.");
           }
           catch( Exception e ) {
               if ( e instanceof AxisFault ) ((AxisFault)e).dump();