You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Chirag Dewan <ch...@yahoo.in> on 2014/01/20 11:58:44 UTC
Issue while using producer template with FTP for Unit Testing
Hi all,
I have a route which collects file from a FTP server. I have written a Unit test case for the same. I have set autoCreate to false and I want to throw an exception if the source directory doesn't exist,which I have done by setting :
startingDirectoryMustExist = true
Now in my test case whenever I call producerTemplate.sendBodyAndHeader(myFTPURI,body,filename) it gives me an excpetion : Error writing file[filename]
After some digging in I figured out that RemoteFileProducer is returning this after a failed FTP operation.
This same thing works with autoCreate=true.
Is there something else I need to do to achieve this.
Thanks
Chirag Dewan