axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r647282 - /webservices/axis2/branches/java/1_4/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java
Date Fri, 11 Apr 2008 19:40:30 GMT
Author: rott
Date: Fri Apr 11 12:40:29 2008
New Revision: 647282

URL: http://svn.apache.org/viewvc?rev=647282&view=rev
Log:
one-way invokes use their own thread, so a client can't tell when it's complete, and may read
the log file too soon

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

Modified: webservices/axis2/branches/java/1_4/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_4/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java?rev=647282&r1=647281&r2=647282&view=diff
==============================================================================
--- webservices/axis2/branches/java/1_4/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java
(original)
+++ webservices/axis2/branches/java/1_4/modules/jaxws-integration/test/org/apache/axis2/jaxws/sample/AddNumbersHandlerTests.java
Fri Apr 11 12:40:29 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"
@@ -743,6 +749,17 @@
         } catch (Exception e) {
             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"
@@ -781,7 +798,18 @@
         } 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"
                 + "AddNumbersClientLogicalHandler CLOSE\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