I am still -1 on this.

Testing camel-spring is just a little tip of the iceberg.
I would rather have consistent test which newer make it out on a ghost
chase because of side effects of running multiple tests in the same
JVM.

With Camel we embed many different frameworks and test together in the
JVM and you can't rely on the JVM being 100% left in a consistent and
clean state between each method that is tested.

Yes Camel takes long time to test, but it has 5500+ tests.

And we got CI servers which test it throughly every day.

And frankly Spring is somewhat slow to start and hence why Camel
Spring is taking its time.
On top of that JMX adds around 15-20% as well.



On Fri, Mar 5, 2010 at 12:34 PM, Christian Schneider
<[email protected]> wrote:
> Sure you can get strange behaviour in some cases but I think if the
> Developer of the test knows that his context is per class it should be ok.
> I am not proposing to change the default as current tests sometimes will
> rely on running isolated. I rather propose to write new tests
> with one context per class where possible and of course to rewrite old tests
> over time.
>
> While you are right that per method will avoid most side effects I think the
> test time could be the more important argument. Currently the
> whole camel build takes way tool long and perhaps this is one way to bring
> the time down.
>
> Greetings
>
> Christian
>
>
>
> Am 05.03.2010 12:16, schrieb Claus Ibsen:
>>
>> -1
>>
>> All tests should run isolated.
>>
>> If you start to keep the JVM up for each test method you can really
>> get some strange and subtle side effects with testing.
>>
>>
>> On Fri, Mar 5, 2010 at 11:52 AM, Christian Schneider
>> <[email protected]>  wrote:
>>
>>>
>>> Hi all,
>>>
>>> I am currently debugging a little in the tests for jetty because I got an
>>> error in a test.
>>> While doing so I found out that the camel context or even the spring
>>> context
>>> is (re)started for each test method. Wouldn´t it be much more efficient
>>> to
>>> do this only per class?
>>> I guess the tests could take less then half the time after this change.
>>> What
>>> do you think?
>>>
>>> Greetings
>>>
>>> Christian
>>>
>>> --
>>>
>>> Christian Schneider
>>> ---
>>> http://www.liquid-reality.de
>>>
>>>
>>>
>>
>>
>>
>
>
> --
>
> Christian Schneider
> ---
> http://www.liquid-reality.de
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Reply via email to