Wow, that was it!

This is really strange. It was working without clearing the bus until
I upgraded jmockit.


On Fri, Sep 4, 2015 at 11:16 AM, Daniel Kulp <[email protected]> wrote:
>
> One thought would be to also make sure you completely shutdown the Bus in the 
> @After or @AfterClass.   That was a problem in many of our unit tests for a 
> while.  If you use the pure jaxws/jaxrs API’s and such, you don’t touch the 
> bus and the default bus remains sitting there ready to go.   However, it 
> could be holding onto things that shouldn’t be shared in a test environment.
>
> Dan
>
>
>
>> On Sep 4, 2015, at 8:26 AM, Benson Margulies <[email protected]> wrote:
>>
>> I've got a family of tests that have just developed a pathology.
>>
>> @Before creates a service on the local transport and a WebClient set
>> to talk to it.
>>
>> @After shuts it down.
>>
>> I can run any single test as many times as I like, all is well.
>>
>> If I use IntelliJ or maven-surefire to run the whole bag, a few will
>> fail with symptoms indicating that the wrong request ended up at the
>> service; one from a prior or different test case.
>>
>> The failure moves around from test to test from run to run.
>>
>> I've seen this with 3.1.1 and 3.1.2.
>>
>> We do have DIRECT_DISPATCH turned on.
>>
>> This whole thing was working in the middle of yesterday, and I seem to
>> have, well, breathed on it. I certainly changed the timing by
>> eliminating a lot of noisy logged backtraces.
>
> --
> Daniel Kulp
> [email protected] - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>

Reply via email to