cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glynn, Eoghan" <eoghan.gl...@iona.com>
Subject RE: Map tests still failing....
Date Thu, 02 Nov 2006 17:31:16 GMT


OK, after much tearing out of hair, I've finally got to the bottom of
this. 
 
The commit of r465145 did more damage than just removing the required
isPartialResponse() logic from the ClientImpl. 

The Exchange.setInMessage() call was also moved from the ClientImpl to
the transport. Now this call was previously contingent on the message
*not* being a partial response. Whereas the transport cannot determine
the fullness or otherwise of the response, so just calls
Exchange.setInMessage() regardless.

This is badness, as the partial and full responses are independent
events that may arrive in *either* order. 

The problem occurs if the full response arrives at the client *before*
the partial response (sounds outlandish, never occurs on my Linux box,
but always occurs on DanK's Linux laptop and also on some of the Bejing
machines). In this case, the full response message is set as the
exchange's InMessage first, but this is then over-written by the
subsequent partial response. So when the ClientImpl calls
exchange.getInMessage().getContent(List.class) to get the result, this
is wrongly applied to the partial response, and of course just returns
null.

Now previously this race condition was avoided, as the transport simply
called inMessage.setExchange(exchange) instead of
exchange.setInMessage(inMessage) ... The latter call was made in the
ClientImpl only if the message was *not* a partial response.

So before I go and restore the old logic, it would be good know what the
motivation for this change was, and if anything else depends on this the
transport-level call to Exchange.setInMessage(). DanD, can you elborate?

Cheers,
Eoghan


> -----Original Message-----
> From: Kulp, John Daniel 
> Sent: 26 October 2006 20:43
> To: cxf-dev@incubator.apache.org
> Subject: Map tests still failing....
> 
> 
> I'm still seeing failing tests for the MAP tests after a "mvn 
> clean install".
> 
> Is there anything (easy) I can look at to figure out why?
> --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727    C: 508-380-7194   F:781-902-8001
> daniel.kulp@iona.com
> 
> 
> 
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> [surefire] Running org.apache.cxf.systest.ws.addressing.MAPTest
> [surefire] Tests run: 3, Failures: 2, Errors: 0, Time 
> elapsed: 6.258 sec
> [surefire]
> [surefire] 
> testImplicitMAPs(org.apache.cxf.systest.ws.addressing.MAPTest)  
> Time elapsed: 1.296 sec  <<< FAILURE!
> junit.framework.ComparisonFailure: unexpected response received from 
> service expected:<Hello implicit1> but was:<null>
>         at junit.framework.Assert.assertEquals(Assert.java:81)
>         at 
> org.apache.cxf.systest.ws.addressing.MAPTest.testImplicitMAPs(
> MAPTest.java:138)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> orImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> odAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at junit.framework.TestCase.runTest(TestCase.java:154)
>         at junit.framework.TestCase.runBare(TestCase.java:127)
>         at junit.framework.TestResult$1.protect(TestResult.java:106)
>         at 
> junit.framework.TestResult.runProtected(TestResult.java:124)
>         at junit.framework.TestResult.run(TestResult.java:109)
>         at junit.framework.TestCase.run(TestCase.java:118)
>         at junit.framework.TestSuite.runTest(TestSuite.java:208)
>         at junit.framework.TestSuite.run(TestSuite.java:203)
>         at 
> junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>         at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>         at 
> junit.framework.TestResult.runProtected(TestResult.java:124)
>         at junit.extensions.TestSetup.run(TestSetup.java:23)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> orImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> odAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at 
> org.apache.maven.surefire.battery.JUnitBattery.executeJUnit(JU
> nitBattery.java:242)
>         at 
> org.apache.maven.surefire.battery.JUnitBattery.execute(JUnitBa
> ttery.java:216)
>         at 
> org.apache.maven.surefire.Surefire.executeBattery(Surefire.java:215)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:126)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:87)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:63)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> orImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> odAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at 
> org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:785)
> 
> [surefire] 
> testVersioning(org.apache.cxf.systest.ws.addressing.MAPTest)  
> Time elapsed: 0.36 sec  <<< FAILURE!
> junit.framework.ComparisonFailure: unexpected response received from 
> service expected:<Hello versioning1> but was:<null>
>         at junit.framework.Assert.assertEquals(Assert.java:81)
>         at 
> org.apache.cxf.systest.ws.addressing.MAPTest.testVersioning(MA
> PTest.java:257)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> orImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> odAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at junit.framework.TestCase.runTest(TestCase.java:154)
>         at junit.framework.TestCase.runBare(TestCase.java:127)
>         at junit.framework.TestResult$1.protect(TestResult.java:106)
>         at 
> junit.framework.TestResult.runProtected(TestResult.java:124)
>         at junit.framework.TestResult.run(TestResult.java:109)
>         at junit.framework.TestCase.run(TestCase.java:118)
>         at junit.framework.TestSuite.runTest(TestSuite.java:208)
>         at junit.framework.TestSuite.run(TestSuite.java:203)
>         at 
> junit.extensions.TestDecorator.basicRun(TestDecorator.java:22)
>         at junit.extensions.TestSetup$1.protect(TestSetup.java:19)
>         at 
> junit.framework.TestResult.runProtected(TestResult.java:124)
>         at junit.extensions.TestSetup.run(TestSetup.java:23)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> orImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> odAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at 
> org.apache.maven.surefire.battery.JUnitBattery.executeJUnit(JU
> nitBattery.java:242)
>         at 
> org.apache.maven.surefire.battery.JUnitBattery.execute(JUnitBa
> ttery.java:216)
>         at 
> org.apache.maven.surefire.Surefire.executeBattery(Surefire.java:215)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:126)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:87)
>         at org.apache.maven.surefire.Surefire.run(Surefire.java:63)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess
> orImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth
> odAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:585)
>         at 
> org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:785)
> 
> 
> 
> Results :
> [surefire] Tests run: 3, Failures: 2, Errors: 0
> 

Mime
View raw message