axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r647276 - /webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java
Date Fri, 11 Apr 2008 19:35:49 GMT
Author: rott
Date: Fri Apr 11 12:35:48 2008
New Revision: 647276

URL: http://svn.apache.org/viewvc?rev=647276&view=rev
Log:
one-way invocations use their own thread, so the client cannot tell when it's done and may
read the log too soon

Modified:
    webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java

Modified: webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java?rev=647276&r1=647275&r2=647276&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java
(original)
+++ webservices/axis2/trunk/java/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java
Fri Apr 11 12:35:48 2008
@@ -296,7 +296,6 @@
         }
     }
 
-    // TODO: disabled until handler support is more complete
     public void testAddNumbersHandlerWithFault() {
         try{
             TestLogger.logger.debug("----------------------------------");
@@ -694,6 +693,13 @@
                     axisEndpoint);
             proxy.oneWayInt(11);
             
+            // one-way invocations run in their own thread,
+            // and we can't tell here in the client when it
+            // has completed.  So, we need to wait long enough
+            // for the invocation to complete, so our log file
+            // is fully populated.
+            Thread.sleep(1000 * 5); // 5 seconds
+            
             String log = readLogFile();
             String expected_calls = "AddNumbersLogicalHandler2 POST_CONSTRUCT\n"
                 + "AddNumbersProtocolHandler2 GET_HEADERS\n"
@@ -744,6 +750,17 @@
             e.printStackTrace();
             assertEquals(e.getMessage(), "I don't like the value 99");
             
+            // one-way invocations run in their own thread,
+            // and we can't tell here in the client when it
+            // has completed.  So, we need to wait long enough
+            // for the invocation to complete, so our log file
+            // is fully populated.
+            try {
+                Thread.sleep(1000 * 5); // 5 seconds
+            } catch (InterruptedException ie) {
+                // nothing
+            }
+            
             String log = readLogFile();
             String expected_calls = "AddNumbersClientLogicalHandler HANDLE_MESSAGE_OUTBOUND\n"
                 + "AddNumbersClientLogicalHandler CLOSE\n";
@@ -781,6 +798,17 @@
         } catch (Exception e) {
             e.printStackTrace();
             assertEquals(e.getMessage(), "I don't like the value 999");
+            
+            // one-way invocations run in their own thread,
+            // and we can't tell here in the client when it
+            // has completed.  So, we need to wait long enough
+            // for the invocation to complete, so our log file
+            // is fully populated.
+            try {
+                Thread.sleep(1000 * 5); // 5 seconds
+            } catch (InterruptedException ie) {
+                // nothing
+            }
             
             String log = readLogFile();
             String expected_calls = "AddNumbersClientLogicalHandler HANDLE_MESSAGE_OUTBOUND\n"



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message