camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Babak Vahdat <>
Subject Re: About the camel-ftp unit-tests which are broken
Date Thu, 16 Aug 2012 15:05:57 GMT

Am 16.08.12 15:32 schrieb "Hadrian Zbarcea" unter <>:

>Why produce output only under target? Only to allow `mvn clean` to clean
>up properly. Maven conventions...

I don't really get your point here! "mvn clean" would *still* clean up
properly even if the tests would create the file under the path
FTP_ROOT_DIR which is "target/res/home" and not directly inside the
"target" folder. Currently it's even worse, as an example try to run the
first test method of SftpSimpleProduceTest which is the method
testSftpSimpleProduce and then look where "hello.txt" get's generated! It
will get generated at the same level of the target folder!!! Then
subversion will consider this as an outgoing change the next time you
would sync with the repo. The reason for this is pretty clear as you
changed the line:

   template.sendBodyAndHeader("sftp://localhost:" + getPort() + "/" +
FTP_ROOT_DIR + "?username=admin&password=admin", "Hello World",
Exchange.FILE_NAME, "hello.txt");


   template.sendBodyAndHeader("sftp://localhost:" + getPort() +
"/?username=admin&password=admin", "Hello World", Exchange.FILE_NAME,

>Same applies to log files in other
>components. I am not sure I cleaned up in all the places.
>I noticed that too. The tests were @Ignore'd before my changes and I
>don't think the reason for failures is only what you mentioned.

This's not true!

Yes the tests were *already* @Ignore'd before you modified them and that
is exactly the root cause of the problem as otherwise we had realized this
much sooner (e.g. by next build on CI-Server). As an example consider
*another* test class: SftpSimpleProduceNotStepwiseTest where you're the
last modifier of it (well, Daniel changed some svn:props after you but
that's not relevant for this discussion). Now enable and run the tests,
all 3 will fail, take the previous revision *before* your change, they
will all pass!

Just to make sure you don't misunderstand me: my aim is NOT to accuse you
or whatnot BUT only to FIX the existing problem creeping after your
revision. As we all know no body is perfect and we do all make mistakes
(including myself). Anyway, I'll raise a JIRA and take over this to fix
them all.

Thanks for your reply and attention.


> As the 
>setUp() did take place, directories were created in the wrong place.
>I hope this helps,
>On 08/16/2012 06:14 AM, Babak Vahdat wrote:
>> Just for the sake of completeness:
>> The broken unit-tests being mentioned here are all "@Ignore"ed, so
>>you've to
>> enable them to see that they're really broken. :-)
>> Babak
>> --
>> View this message in context:
>> Sent from the Camel Development mailing list archive at

View raw message