cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Diephouse <...@envoisolutions.com>
Subject Re: Map tests still failing....
Date Fri, 03 Nov 2006 05:51:10 GMT
Hiya Eoghan,
Sorry for the trouble this caused. You're completely right, this is the 
wrong thing to be doing.

I think I did it because I wanted a way for messages to be correlated at 
the transport level. For instance, lets take JMS with a correlation ID - 
there should be someway to say from a transport - "you see this message? 
this message is a response to your request!"

Here is where I think I messed up: instead of just doing 
message.setExchange(ex) - I did message exchange.setInMessage(message). 
We know the former but not the latter. I seem to recall this also had 
something to do with the practicality of receiving faults on the client 
as well, but to be honest I don't remember what exactly...

Complete oversight on my part... Things are crazy busy tomorrow, but if 
you don't get to it tomorrow, I'll try to get this resolved over the 
weekend.

Regards,
- Dan

Glynn, Eoghan wrote:

>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
>>
>>    
>>


-- 
Dan Diephouse
(616) 971-2053
Envoi Solutions LLC
http://netzooid.com


Mime
View raw message