Trustin Lee wrote:

2005/10/12, Alex Karasulu <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>:

    Trustin Lee wrote:

    > The essential problem in our project is that our tests are not unit
    > tests.  If we're doing unit tests, we don't need to start up the
    whole
    > ApacheDS everytime we test each classes.  But we're doing so by
    some
    > reason and the tests takes too much time.  Ideally we should change
    > all of them to unit tests strictly speaking.

    You're right these are more *integration* tests and not simple unit
    tests.  Again correctness is not always the most sensible approach in
    our present not so perfect situation :).

    It's very hard to unit test these interceptors properly though because
    many presume access to the core.  I see how you performed unit
    tests on
    the ACI code but I think this was a special case.  Without a
    harness you
    cannot really test an interceptor.


Once we implement in-memory DirectoryPartition (formerly ContextPArtition) implementation, then we can implement mock NextInterceptor very easily which is the hardest part. Nothing is different in this case.

    So what you're suggesting is we move these tests to an apacheds test
    project?  Hmmm ... That would mean we don't have to create the extra
    maven projects since there would be no dep in core and in main for
    these
    abstract testcases.  I like the sound of this, but it raises some
    concerns for me. I kind of like the fact that nothing deploys unless
    those tests pass even though it takes a long time for them to run.


Yes. But this doesn't necessarily mean that we have to run integration test for *every* test case just like now. We can create a single integration test that tries to launch ApacheDS with full set of interceptors and to test basic LDAP operations. If the core still has some issues, then it's a bug of our test code primarily so I cannot believe the integration test helps us to test individual interceptors.

I don't know what you're talking about now.   Sorry I'm lost.

Alex

Reply via email to