cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r774820 - in /cxf/branches/2.1.x-fixes: ./ rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationSequenceTest.java systests/src/test/java/org/apache/cxf/systest/ws/util/MessageRecorder.java
Date Thu, 14 May 2009 15:23:32 GMT
Author: dkulp
Date: Thu May 14 15:23:29 2009
New Revision: 774820

URL: http://svn.apache.org/viewvc?rev=774820&view=rev
Log:
Merged revisions 774760 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r774760 | eglynn | 2009-05-14 09:29:56 -0400 (Thu, 14 May 2009) | 2 lines
  
  Removed minor race conditions in RM tests and improved test diagnostics
........

Modified:
    cxf/branches/2.1.x-fixes/   (props changed)
    cxf/branches/2.1.x-fixes/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationSequenceTest.java
    cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/util/MessageRecorder.java

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu May 14 15:23:29 2009
@@ -1 +1 @@
-/cxf/trunk:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558
+/cxf/trunk:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760

Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.1.x-fixes/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationSequenceTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationSequenceTest.java?rev=774820&r1=774819&r2=774820&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationSequenceTest.java
(original)
+++ cxf/branches/2.1.x-fixes/rt/ws/rm/src/test/java/org/apache/cxf/ws/rm/DestinationSequenceTest.java
Thu May 14 15:23:29 2009
@@ -340,18 +340,18 @@
         for (int i = 0; i < 10; i++) {
             seq.acknowledge(messages[i]);
             try {
-                Thread.sleep(50);
+                Thread.sleep(55);
             } catch (InterruptedException ex) {
                 // ignore
             }
         }
         int mpm1 = monitor.getMPM();
-        assertTrue(mpm1 > 0);
+        assertTrue("unexpected MPM: " + mpm1, mpm1 > 0);
         
         for (int i = 10; i < messages.length; i++) {
             seq.acknowledge(messages[i]);
             try {
-                Thread.sleep(100);
+                Thread.sleep(110);
             } catch (InterruptedException ex) {
                 // ignore
             }

Modified: cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/util/MessageRecorder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/util/MessageRecorder.java?rev=774820&r1=774819&r2=774820&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/util/MessageRecorder.java
(original)
+++ cxf/branches/2.1.x-fixes/systests/src/test/java/org/apache/cxf/systest/ws/util/MessageRecorder.java
Thu May 14 15:23:29 2009
@@ -19,6 +19,8 @@
 
 package org.apache.cxf.systest.ws.util;
 
+import java.util.List;
+
 import junit.framework.Assert;
 
 public class MessageRecorder extends Assert {
@@ -52,7 +54,34 @@
             }
             waited += 100;
         }
-        assertEquals("Did not receive expected number of inbound messages", nExpectedIn,
nIn);
-        assertEquals("Did not send expected number of outbound messages", nExpectedOut, nOut);
       
+        if (nExpectedIn != nIn) {
+            System.out.println((nExpectedIn < nIn ? "excess" : "shortfall")
+                               + " of " + Math.abs(nExpectedIn - nIn)
+                               + " incoming messages");
+            System.out.println("\nMessages actually received:\n");
+            List<byte[]> inbound = inRecorder.getInboundMessages();
+            for (byte[] b : inbound) {
+                System.out.println(new String(b) + "\n");
+                System.out.println("----------------\n");
+            }
+        }
+        if (nExpectedOut != nOut) {
+            System.out.println((nExpectedOut < nOut ? "excess" : "shortfall")
+                               + " of " + Math.abs(nExpectedOut - nOut)
+                               + " outgoing messages");
+            System.out.println("\nMessages actually sent:\n");
+            List<byte[]> outbound = outRecorder.getOutboundMessages();
+            for (byte[] b : outbound) {
+                System.out.println(new String(b) + "\n");
+                System.out.println("----------------\n");
+            }
+        }
+        
+        if (nExpectedIn > nIn) {
+            assertEquals("Did not receive expected number of inbound messages", nExpectedIn,
nIn);
+        }
+        if (nExpectedOut > nOut) {
+            assertEquals("Did not send expected number of outbound messages", nExpectedOut,
nOut);
+        }        
     }    
 }



Mime
View raw message