Return-Path: X-Original-To: apmail-directory-dev-archive@www.apache.org Delivered-To: apmail-directory-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 54925D1DC for ; Sat, 25 May 2013 13:05:08 +0000 (UTC) Received: (qmail 21296 invoked by uid 500); 25 May 2013 13:05:07 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 21073 invoked by uid 500); 25 May 2013 13:05:05 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 21021 invoked by uid 99); 25 May 2013 13:05:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 May 2013 13:05:03 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of elecharny@gmail.com designates 74.125.82.180 as permitted sender) Received: from [74.125.82.180] (HELO mail-we0-f180.google.com) (74.125.82.180) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 May 2013 13:04:56 +0000 Received: by mail-we0-f180.google.com with SMTP id t60so2281578wes.25 for ; Sat, 25 May 2013 06:04:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=PTZUi/u/UfH6pPIM8cz7LeYj7Juf/OD8zoX6u47bLmI=; b=Wz7d65ZkPXZQ0t75eB1YODPej5LCc2PBkZPVPGcgWeIkEi/X79iM0nuAOu65rbs36K UBffH0m9eAabdDfb8P+hnPvLw9HepUZLy+p+f2O0q/86MtUP6WRPzIETW/vMGpr8l7MS AXvXLYxXQhvnXxZUyZBVxx/KWCNzsAHPDOZVVrER10QBf8mmBXxqzLM1ex04XQhatG1h RktOwwMwr1hgcJ1kd9PrGcqncdKHn2DRQ9VWpQ5JMTebyKnMm9tuYxoWT7ZRxb3nKp6C RS8hifcrgFMlQsXVRu0QrsX1O1nBHhmrajjodIGTUUH7JYCF1ri6KXrjBn6CYBlCPYkr kwhA== X-Received: by 10.180.183.211 with SMTP id eo19mr2320233wic.37.1369487076030; Sat, 25 May 2013 06:04:36 -0700 (PDT) Received: from Emmanuels-MacBook-Pro.local (ran75-1-78-192-106-184.fbxo.proxad.net. [78.192.106.184]) by mx.google.com with ESMTPSA id q13sm4951164wie.8.2013.05.25.06.04.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 25 May 2013 06:04:35 -0700 (PDT) Message-ID: <51A0B6E2.9000704@gmail.com> Date: Sat, 25 May 2013 15:04:34 +0200 From: =?UTF-8?B?RW1tYW51ZWwgTMOpY2hhcm55?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 MIME-Version: 1.0 To: Apache Directory Developers List Subject: Re: Server-integ tests are taking way too long... References: <51A08EF4.6010502@gmail.com> <51A0A806.5000601@stefan-seelmann.de> In-Reply-To: <51A0A806.5000601@stefan-seelmann.de> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org 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