camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chirag Dewan <chirag.dewa...@yahoo.in>
Subject Issue while using producer template with FTP for Unit Testing
Date Mon, 20 Jan 2014 10:58:44 GMT
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
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message