directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Seelmann <m...@stefan-seelmann.de>
Subject Re: Server-integ tests are taking way too long...
Date Sat, 25 May 2013 12:01:10 GMT
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.

Kind Regards,
Stefan


Mime
View raw message