directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <>
Subject Re: Kerberos implementation questions
Date Tue, 10 Jul 2007 06:19:39 GMT
Alex Karasulu a écrit :

> Right now the organization is setup to have two kinds of integration 
> tests
> in two separate modules:
>    core-unit => which IMO should be called core-integration :)
>    server-unit => which IMO should be called server-integration :)

Well, there is a little difference between those names. I think that 
core-unit and server-unit are good names, because they tell exactly what 
they are good for : unit-testing the core and the server (MINA 
included). IMHO, the proposed name (ie xxx-integration) is not good 
because it suggest that it contains only integration tests, which is not 
the case. Remember that to run in-test, you have to set -Dintegration 
when running mvn.

That's another pb we have : integration tests are somhow mixed with unit 
tests... Anyway, not a big deal.

> <SNIP>

> However we
> can add
> any kind of network protocol test to these tests.

Yes, we can, but I don't really think this would be a good idea. Ok, let 
me explain what I have in mind : the base of all protocol is LDAP. Those 
tests have been written to validate the core server (LDAP). Any other 
protocols will use LDAP, so if we include other protocols tests into 
server-unit, it will become a big mess. Suppose someone want to fix 
something in protocol-NTP, he will have to change the server-unit to add 
its new integration tests, and if the fix is not ok, then all the build 
will be broken. With a clear separation, it will be possible to remove 
the procotol-NTP-unit from the main pom.xml in order to build the server.

Two more points :
- I know that we are not supposed to commit a broken piece of code, but, 
face the facts, it happens
- if someone is just trying to work on a specific protocol, I'm not sure 
he has to run all the 15 minutes unit tests just to be sure his fix is ok.

> If we add a kerberos-unit then to follow the same scheme we would have to
> rename
> server-unit to ldap-unit.  

Well, may be. At least, it makes sense.

> Then we would create a changepw-unit and so on.
> I don't know
> how many tests we're adding but if not that many keeping them in the same
> project
> may be less overhead both in terms of maven build time and in terms of
> managing the
> project.

I'm not sure that having 5 more sub-projects will cost a lot compared to 
the time spent in each server-unit and core-unit tests (around half a 
second per test). When you run eclipse:eclipse, the full build is very 
fast (less than 30seconds), compared to running mvn -Dintegration test 
(15 minutes on my laptop).

Clarity should be favored, IMHO. Maybe we should add a subdivision 
called protocol, and have sub-sub-projects in it :

  +--> core
  +--> ...
  +--> protocols
          +--> LDAP
          +--> Kerberos
          +--> ...

> I'd recommend (for now) just putting the kerberos tests and other 
> protocol
> tests into a
> special package to differentiate them from the LDAP integration tests in
> server-unit.  We
> eventually need to better organize them but a package level separation
> should give
> new comers enough of a cue as to the nature of the test.

Really, I don't think so. We have hundred of unit tests in server-unit, 
and the package separation does not give an immediat clue about them. If 
we have to rename server-unit to ldap-unit, then it won't be good. I 
don't really like the idea of having all the protocol tests into 
server-unit... But may be it's just me ;)

> For now I say because I'd like to keep the tests together as much as
> possible since we
> may soon need to refactor these integration tests to use one or more test
> suites that starts
> a single server which is cleaned out rather than deleted and restarted 
> for
> each test method
> or test class.  Clumping the integration tests into packages may make 
> this
> job easier down
> the road for us.

We definitively need to find a better way to organize tests. Starting 
and shutting down the sevrer for each tests is just killing us. Now, as 
I said, I would prefer to have a separate sub-project for kerberos tests 
for the reasons I mentionned before. Of course, this is just my opinion, 
and I won't roll down the floor crying and yelling if you think it's 
better to gather all of them with a package separation.

I will be off for 2 weeks, so it's up to you, guys !


View raw message