Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-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 1E8C59E27 for ; Sat, 18 Feb 2012 21:31:24 +0000 (UTC) Received: (qmail 48673 invoked by uid 500); 18 Feb 2012 21:31:22 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 48600 invoked by uid 500); 18 Feb 2012 21:31:22 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 48593 invoked by uid 99); 18 Feb 2012 21:31:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Feb 2012 21:31:22 +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 dawid.weiss@gmail.com designates 209.85.210.176 as permitted sender) Received: from [209.85.210.176] (HELO mail-iy0-f176.google.com) (209.85.210.176) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 18 Feb 2012 21:31:14 +0000 Received: by iagz35 with SMTP id z35so8290392iag.35 for ; Sat, 18 Feb 2012 13:30:53 -0800 (PST) Received-SPF: pass (google.com: domain of dawid.weiss@gmail.com designates 10.50.149.162 as permitted sender) client-ip=10.50.149.162; Authentication-Results: mr.google.com; spf=pass (google.com: domain of dawid.weiss@gmail.com designates 10.50.149.162 as permitted sender) smtp.mail=dawid.weiss@gmail.com; dkim=pass header.i=dawid.weiss@gmail.com Received: from mr.google.com ([10.50.149.162]) by 10.50.149.162 with SMTP id ub2mr4592520igb.1.1329600653289 (num_hops = 1); Sat, 18 Feb 2012 13:30:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; bh=VJKIS8FBhLz+cujO4jfJ/HNkjzxJYL4Tybt1/YxqgOQ=; b=TXGEb2ZD2Hyz5kiuMy7dd/DKn8n/2Lft+ijfQYcB8tzLMwMq7bNfBkhyeYkN+hNkWu bOWeher77+e2T5Jp4g1V5/whFzDTfg25IZrje8fEaoZOicu0zhrS3DfGl9gVVItrQGZT YxqWgP1zmUHOa9K5zGqK9oHPZ2xL0G8ye4drc= Received: by 10.50.149.162 with SMTP id ub2mr3728315igb.1.1329600653154; Sat, 18 Feb 2012 13:30:53 -0800 (PST) MIME-Version: 1.0 Sender: dawid.weiss@gmail.com Received: by 10.42.167.198 with HTTP; Sat, 18 Feb 2012 13:30:33 -0800 (PST) In-Reply-To: <004301ccee83$64668ab0$2d33a010$@thetaphi.de> References: <004301ccee83$64668ab0$2d33a010$@thetaphi.de> From: Dawid Weiss Date: Sat, 18 Feb 2012 22:30:33 +0100 X-Google-Sender-Auth: AViuw6K3_osMa3T5FxMOZEoEeME Message-ID: Subject: Re: [important] Refactoring of tests infrastructure. To: dev@lucene.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org > :-) It would be great if we could ever have that, but I don=E2=80=99t thi= nk that=E2=80=99s possible! > Most non-reproducibility in Lucene came from multi-threaded tests where t= he different threads interact with > each other... And that cannot be solve= d in any case without serial execution. If there are race conditions in threads involved in the suite (or if there are unpredictable timing schedules resulting from network or disk operations) then sure -- it's an impossible case. But race conditions shouldn't be a result of sharing a single random generator; it's possible to avoid that by giving each thread its own copy of a Random instance if it asks for one (predictably initialized to the same starting seed from each thread). This is effectively a thread-local randomness and ensures any call sequence to it from within a thread will be reproducible. I've implemented this as part of RandomizedRunner and it works really well. Upgrading to RandomizedRunner is a long-term goal though, I need to refactor LTC in smaller steps to avoid going insane ;) You could even go a step further and make sure Randoms are not shared by locking-in and verifying the owner thread in each call... This would break a LOT of existing tests though -- I don't have any estimates how much effort would be needed to straighten these up. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org