directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lecharny <elecha...@apache.org>
Subject Re: Cleanup levels& Mode for tests
Date Fri, 13 Feb 2009 16:42:30 GMT
On Fri, Feb 13, 2009 at 5:22 PM, Alex Karasulu <akarasulu@gmail.com> wrote:
> Ahh so you're saying we can infer when to cleanup from the mode and don't
> need to specify explicity when to cleanup?

yes. Let me explain.

if we have a test which is not the first one in a class,
1-1) If we have a test with mode = PRISTINE, we don't care : the
server is wept out
1-2) If the mode is RESTART, CUMULATIVE or NOSERVICE, we don't do anything
1-3) If the mode is ROLLBACK, we rollback the method changes
(including the LDIFs)
1-4) If the test does not define a mode, then step 2:

step 2
2-1) if the class mode is PRISTINE, we wipeout the server
2-2) if the class mode is RESTART, CUMULATIVE or NOSERVICE, we don't do anything
2-3) if the class mode is ROLLBACK, we rollback the method changes and
LDIFs AND the class LDIFs
2-4) if the class does not define a mode, then step 3

step 3
3-1) if the suite mode is PRISTINE, we wipe the server
3-2) if the suite mode is RESTART, CUMULATIVE or NOSERVICE, we don't do anything
3-3) if the suite mode is ROLLBACK, we rollback the the method changes
and LDIFs AND the class LDIFs AND the suite LDIFs
3-4) if the class does not define a mode, then assume that the mode is
ROLLBACK for the test, and go back to (1-3)

If the test is the first one for a class which is not the first class
for the suite, then we have to check the class mode :
4-1) if the class mode is PRISTINE, wipe the data
4-2) if the class mode is RESTART, CUMULATIVE or NOSERVICE, we don't do anything
4-3) if the class mode is ROLLBACK, then we revert the class LDIFs
4-4) if the class does not define a mode, then step 4

step 4
5-1) if the suite mode is PRISTINE, wipe the data
5-2) if the suite mode is RESTART, CUMULATIVE or NOSERVICE, we don't do anything
5-3) if the suite mode is ROLLBACK, then we revert the class LDIFs
5-4) if the suite does not define a mode, then assume that the class
mode is ROLLBACK and go back to (4-3)

last, not least, if a test is first one of teh first class of the
suite, we just start the server from scratch

In any case, we can deduce the clean level from the mode.

-- 
Regards,
Cordialement,
Emmanuel L├ęcharny
www.iktek.com

Mime
View raw message