camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Babak Vahdat <>
Subject Re: About false-positive Test inside Camel source!
Date Thu, 01 Mar 2012 14:14:24 GMT

It seems there're still other false-positive unit tests as well one of which
I fixed
right before [1] as I saw the JMS Header discussion @ user forum.

IMHO in *almost* all cases we should assertTrue() on ALL
CountDownLatch.await() calls
to return true (the timeout should not elapse). And also using the
onException() clause
NEVER and EVER rely on:

junit.framework.AssertionFailedError, org.junit.ComparisonFailure or the
likes, BUT only


In the case of the test mentioned we had:


However the thrown exception through JUnit was org.junit.ComparisonFailure
while we did
assertEquals() inside the processor so that the onException() clause did
*not* trigger at all!

I hope I'm *definitely* wrong but somehow I've got the feeling that there're
much more such
unit-tests out there in Camel source itself!

As the test behaved false positive we didn't realize it by CAMEL-1871. BTW,
maybe it's
just a matter of my personal taste but I HATE false-positive tests :-(((



View this message in context:
Sent from the Camel Development mailing list archive at

View raw message