directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Lécharny <elecha...@gmail.com>
Subject Re: Server-integ tests are taking way too long...
Date Sat, 25 May 2013 13:04:34 GMT
Le 5/25/13 2:01 PM, Stefan Seelmann a écrit :
> On 25.05.2013 12:14, Emmanuel Lécharny wrote:
>> The PasswordPolicy tests are expensive because they need to sleep to
>> check some time condition. At this point, I'm wondering if it would not
>> worth creating a separate module for it.
> Hm, maybe we can avoid using the "real" time (via
> System.currentTimeMillis) and use a "time provider" instead. By default
> it obtails the system time. But for tests the returned time can be
> modified according to the test needs. JodaTime for example has a
> DateTimeUtils class with static accessors for getting and setting the
> time. In other projects we used a TimeProvider interface with different
> implementations for production and tests.

That would be an extremely useful thing. I think we can benefit from
such an addition for the replication tests, especially those which are
time dependents. We can even simuate some use cases that are time
dependent this way.



-- 
Regards,
Cordialement,
Emmanuel Lécharny
www.iktek.com 


Mime
View raw message