Author: dkulp
Date: Fri May 11 17:34:03 2012
New Revision: 1337291
URL: http://svn.apache.org/viewvc?rev=1337291&view=rev
Log:
Fix some random failures where we may need to wait for an additional
message to get all the acks.
Modified:
cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ClientPersistenceTest.java
Modified:
cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ClientPersistenceTest.java
URL:
http://svn.apache.org/viewvc/cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ClientPersistenceTest.java?rev=1337291&r1=1337290&r2=1337291&view=diff
==============================================================================
---
cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ClientPersistenceTest.java
(original)
+++
cxf/trunk/systests/ws-rm/src/test/java/org/apache/cxf/systest/ws/rm/ClientPersistenceTest.java
Fri May 11 17:34:03 2012
@@ -27,6 +27,8 @@ import java.util.logging.Logger;
import javax.xml.ws.BindingProvider;
import javax.xml.ws.Endpoint;
+import junit.framework.AssertionFailedError;
+
import org.apache.cxf.Bus;
import org.apache.cxf.BusFactory;
import org.apache.cxf.bus.spring.SpringBusFactory;
@@ -270,8 +272,16 @@ public class ClientPersistenceTest exten
// mf.verifyActions(expectedActions, false);
// mf.verifyAcknowledgements(new boolean[]{true, true, false}, false);
- // verify the final ack range to be complete
- mf.verifyAcknowledgementRange(1, 5);
+ // verify the final ack range to be complete
+ try {
+ mf.verifyAcknowledgementRange(1, 5);
+ } catch (AssertionFailedError er) {
+ //possibly only got the first 2 ranges when split in 3, lets
+ //wait for the third and then recheck
+ awaitMessages(1, 3);
+ mf.reset(out.getOutboundMessages(), in.getInboundMessages());
+ mf.verifyAcknowledgementRange(1, 5);
+ }
}
void recover() throws Exception {