ws-wsif-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From whitl...@apache.org
Subject cvs commit: xml-axis-wsif/java/test/util TestUtilities.java BridgeThread.java
Date Fri, 31 Jan 2003 11:17:16 GMT
whitlock    2003/01/31 03:17:16

  Modified:    java/test/inout InoutTest.java
               java/test/util TestUtilities.java BridgeThread.java
  Log:
  16632: Make tests run against an axis server
  
  Revision  Changes    Path
  1.11      +6 -4      xml-axis-wsif/java/test/inout/InoutTest.java
  
  Index: InoutTest.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/test/inout/InoutTest.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- InoutTest.java	20 Jan 2003 15:56:35 -0000	1.10
  +++ InoutTest.java	31 Jan 2003 11:17:16 -0000	1.11
  @@ -135,10 +135,12 @@
           super(name);
       }
   
  -	public static void main(String[] args) {
  -	   TestUtilities.startListeners();	
  -	   junit.textui.TestRunner.run (suite());
  -	   TestUtilities.stopListeners();	
  +    public static void main(String[] args)
  +    {
  +        TestUtilities.startListeners(
  +            TestUtilities.INOUT_LISTENER | TestUtilities.NATIVEJMS_LISTENER);
  +        junit.textui.TestRunner.run(suite());
  +        TestUtilities.stopListeners();
       }
   
       public static Test suite() {
  
  
  
  1.19      +8 -0      xml-axis-wsif/java/test/util/TestUtilities.java
  
  Index: TestUtilities.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/test/util/TestUtilities.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- TestUtilities.java	14 Jan 2003 16:43:19 -0000	1.18
  +++ TestUtilities.java	31 Jan 2003 11:17:16 -0000	1.19
  @@ -106,6 +106,9 @@
       public static final int STOCKQUOTE_LISTENER = 2;
       public static final int ASYNC_LISTENER = 4;
       public static final int NATIVEJMS_LISTENER = 8;
  +    public static final int INOUT_LISTENER = 16;
  +    // ALL_LISTENERS doesn't include the INOUT_LISTENER because 
  +    // inout and addressbook both listen on the same queue.
       public static final int ALL_LISTENERS = 15;
   
       public static final Class DEFAULT_SOAP_PROVIDER_CLASS = 
  @@ -259,6 +262,11 @@
               if ((which & STOCKQUOTE_LISTENER) > 0) {
                   jmsSq = new BridgeThread("Stockquote");
                   jmsSq.start();
  +            }
  +
  +            if ((which & INOUT_LISTENER) > 0) {
  +                jmsAb = new BridgeThread("AddressBook", "Inout");
  +                jmsAb.start();
               }
   
               if ((which & NATIVEJMS_LISTENER) > 0)
  
  
  
  1.4       +20 -6     xml-axis-wsif/java/test/util/BridgeThread.java
  
  Index: BridgeThread.java
  ===================================================================
  RCS file: /home/cvs/xml-axis-wsif/java/test/util/BridgeThread.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BridgeThread.java	14 Jan 2003 16:43:19 -0000	1.3
  +++ BridgeThread.java	31 Jan 2003 11:17:16 -0000	1.4
  @@ -68,21 +68,35 @@
    */
   
   class BridgeThread extends Thread {
  -    private String name;
  +    private String queueName;
  +    private String serviceName;
   
       public BridgeThread(String name) {
  -        this.name = name;
  +        this.queueName = name;
  +        this.serviceName = name;
  +    }
  +
  +    public BridgeThread(String queueName, String serviceName) {
  +        this.queueName = queueName;
  +        this.serviceName = serviceName;
       }
   
       public void run() {
           try {
  -            System.out.println("Starting " + name + " JMS2HTTPBridge");
  +            if (TestUtilities.isJmsVerbose())
  +                System.out.println(
  +                    "Starting "
  +                        + serviceName
  +                        + "("
  +                        + queueName
  +                        + ") JMS2HTTPBridge");
  +
               String pattern =
                   TestUtilities.getWsifProperty(
                       "wsif.jms2httpbridge.jndidestinationnamepattern");
               String queue =
                   pattern.substring(0, pattern.indexOf('%'))
  -                    + name
  +                    + queueName
                       + pattern.substring(pattern.indexOf('%') + 1);
   
               String url =
  @@ -90,7 +104,7 @@
               if (TestUtilities.getSoapServer().equals("axis")) {
                   if (!url.endsWith("/"))
                       url = url.concat("/");
  -                url = url.concat(name);
  +                url = url.concat(serviceName);
               }
                           
               JMS2HTTPBridge j2h =
  @@ -107,7 +121,7 @@
                       TestUtilities.isJmsVerbose());
               j2h.listen();
           } catch (Exception e) {
  -            System.out.println("Caught JMS2HTTPBridge exception " + e);
  +            System.err.println("Caught JMS2HTTPBridge exception " + e);
           }
       }
   }
  
  
  

Mime
View raw message