You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Stefan Seelmann <se...@apache.org> on 2009/04/25 23:48:21 UTC

Integration Tests: StockServerISuite and @Factory

Hi guys,

I added a factory to the AddIT, that adds two additional partitions. It
worked fine when I run the class standalone, but it didn't work when
running the StockServerISuite.

The StockServerISuite runs several test classes. These test classes have
different cleanup levels, some Level.SUITE and some Level.CLASS. Also,
some of these test classes define there own LdapServerFactory using the
@Factory annotation. I found out that the specific factory is not used
if the previous test class has cleanup level Level.SUITE. An example:

        ...
        ModifyRemoveIT.class,   <- Level.SUITE
        ModifyReplaceIT.class,  <- Factory _not_ used
        ModifyRdnIT.class,
        BindIT.class,
        SimpleBindIT.class,
        MoveIT.class,
        SearchIT.class,         <- Level.CLASS
        NegationSearchIT.class, <- Factory used
        ...

Can we fix this? Should we remove all test classes with own factories
from the suite?

As a workaround I removed the AddIT test class from the suite and added
it to the pom.xml, see [1].

Kind Regards,
Stefan

[1] http://svn.apache.org/viewvc?rev=768609&view=rev