fixed!!! You have the global static variable that is being set by one test setUp, this is then set incorrectly for all tests. For now I added a setUp to FtpLetContainerTestTemplate:
protected void setUp() throws Exception {
   MockFtplet.callback = new MockFtpletCallBack();
   MockFtplet.callback.returnValue = FtpletEnum.RET_DEFAULT;
}

However this seems rather fragile, so hopefully someone can refactor this unit test to make it more robust.

Mark

Mark Proctor wrote:
I'm looking into the code it seems that the setUp() is not always working, there it references a public static value and sets it to FtpletEnum.RET_DEFAULT, however when I'm debugging the code, on the times it doesn't work, its switched too RET_SKIP which causes the array iterator to exit after the first FtpLet execution. Sorry for the running commentry, wasn't expecting to debug this, anyway I'll keep looking.

Mark.
Mark Proctor wrote:
I tried again this time all the tests in the package org.apache.ftpserver.ftplet this time only testOnLogin failed. But its the same thing:
assertEquals( 2, calls.size() )
Its expecting 2, but getting one. Is there a quick fix to stabalise this?

Mark
Mark Proctor wrote:
The test fails when running in both Eclipse and Maven. However if I run the class org.apache.ftpserver.ftplet.DefaultFtpLetContainerTest on its own, and not as part of a set of tests, then it passes.

Mark
Mark Proctor wrote:
I'm just trying trunk and there is a test failure:
org.apache.ftpserver.ftplet.DefaultFtpLetContainerTest
testOnUploadUniqueEnd(.....)
AssertionFailed: expected:<2> but was:<1>

Is trunk stable, or is there another recent release I should be using?

Mark








Reply via email to