You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by jl...@apache.org on 2007/04/28 21:48:29 UTC
svn commit: r533420 -
/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java
Author: jliu
Date: Sat Apr 28 12:48:28 2007
New Revision: 533420
URL: http://svn.apache.org/viewvc?view=rev&rev=533420
Log:
Write a test case for CXF-612: Handler's close method is not called when runtime exception is thrown from handleFault
Modified:
incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java
Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java?view=diff&rev=533420&r1=533419&r2=533420
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/HandlerChainInvokerTest.java Sat Apr 28 12:48:28 2007
@@ -190,6 +190,8 @@
assertEquals(1, logicalHandlers[0].getHandleMessageCount());
assertEquals(1, logicalHandlers[1].getHandleMessageCount());
+ assertEquals(1, logicalHandlers[0].getHandleFaultCount());
+ assertEquals(0, logicalHandlers[1].getHandleFaultCount());
continueProcessing = invoker.invokeLogicalHandlers(false, lmc);
@@ -398,6 +400,14 @@
assertTrue(invoker.isClosed());
assertEquals(1, logicalHandlers[0].getHandleFaultCount());
assertEquals(0, logicalHandlers[1].getHandleFaultCount());
+
+ // JAXB spec 9.3.2.2: Throw any other runtime exception This indicates
+ // that fault message processing should cease. Fault message processing stops,
+ // close is called on each previously invoked handler in the chain, the exception is
+ // dispatched
+ //FIXME: CXF-612
+ //assertEquals(1, logicalHandlers[0].getCloseCount());
+ //assertEquals(0, logicalHandlers[1].getCloseCount());
}
private boolean doInvokeProtocolHandlers(boolean requestor) {