On Wed, Nov 19, 2008 at 2:57 PM, Claus Ibsen <[EMAIL PROTECTED]> wrote:
> Hi > > We have a ticket for a new feature to allow a sort of callback for > rollback / commit when an exchange is finished. James suggested to use > the UnitOfWork. So I guess if we could get that work started it would > be possible using that to get a callback when the file producer has > written the file and this the delay could be removed. Cool stuff. > > > But when I started adding all these unit tests using sleep was the > easiest to get going. I didn't envision there would be like 30 unit > test for the file component with all their 1-2 sec sleeps. Or even > longer to allow it to pass on all boxes from XP to unix on fast and > slow ones. Don't worry about it. There are sleeps everywhere else too :) It kinda hurts productivity to try and make tests perfect anyways... that said, I did create a ticket for fixing this *eventually* (CAMEL-966). Maybe as a start we could put in the support to make better tests without sleeps. > > > > /Claus Ibsen > Apache Camel Committer > Blog: http://davsclaus.blogspot.com/ > > > > On Wed, Nov 19, 2008 at 4:31 PM, Jon Anstey <[EMAIL PROTECTED]> wrote: > > Great ideas guys. I think I'll focus on the memory feature first though, > so > > it doesn't get too confusing ;) > > > > On the testability with noop bit: a big +1 from me for keeping anything > that > > would make testing easier! In particular, I'd like to improve the file > > component tests by removing as many sleeps as possible. There are sleeps > > everywhere in the Camel tests but I've found that the file tests have > > particularily long sleeps which make for slow builds. Perhaps I'll get > > around to putting in a file watcher assertion or something eventually. > > > > On Wed, Nov 19, 2008 at 7:22 AM, Claus Ibsen <[EMAIL PROTECTED]> > wrote: > > > >> > FWIW, I actually like the simple noop one for creating unit tests > because > >> it > >> > allows you to just refer to the /src/test/resources folder in your > >> project > >> > instead of having to copy them to a work folder first. > >> Yeah here it has a good purpose. I guess James Strachan and others > >> have used it in unit testing other components, to get some payload > >> from a file. > >> > >> Maybe the postAction=noop should be supported ;) > >> > >> /Claus > >> > > > > > > > > -- > > Cheers, > > Jon > > > > http://janstey.blogspot.com/ > > > -- Cheers, Jon http://janstey.blogspot.com/
