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 B71569024 for ; Wed, 16 May 2012 14:36:24 +0000 (UTC) Received: (qmail 76197 invoked by uid 500); 16 May 2012 14:36:23 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 75912 invoked by uid 500); 16 May 2012 14:36:23 -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 75904 invoked by uid 99); 16 May 2012 14:36:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 May 2012 14:36:23 +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.213.176 as permitted sender) Received: from [209.85.213.176] (HELO mail-yx0-f176.google.com) (209.85.213.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 May 2012 14:36:15 +0000 Received: by yenm14 with SMTP id m14so919305yen.35 for ; Wed, 16 May 2012 07:35:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=rTczcBMdvFZ+o7TjEL2OL1CANBzAtWhpzqBJZq3v4Sc=; b=qKjvTKJZlWtME7XPMtmYkebk84M8WQThWGRqwnY4Y9HdNkLizK+Nh6BeYglch54rTL I+sdqEo2KqVcTK57/OciztLLSjtD/PVIgylehNlcHH1o+oSzkcsvzFtuCXgEKxzdFNbX 9INhwaUG/atvWyiJW/ZLUyj9Acr5sfNwyaJ8TSrZXebX/3D8lT7XdVw4a7G3clGi71yC 9Rh9KW4bgfbOCGpBcFhO+ehlNrePRj/7AYDKydGn19nk9hdekEC3D84dMR1UwhRIg+ww sUVqkIzWHNN3cQvaFITvAshOcuwu+vjKPpeuHLlS9/WYtq1J5omIC6OeBlW9Ji3TZCdB UeJg== Received: by 10.50.219.136 with SMTP id po8mr2222886igc.70.1337178954642; Wed, 16 May 2012 07:35:54 -0700 (PDT) MIME-Version: 1.0 Sender: dawid.weiss@gmail.com Received: by 10.43.80.73 with HTTP; Wed, 16 May 2012 07:35:34 -0700 (PDT) In-Reply-To: References: From: Dawid Weiss Date: Wed, 16 May 2012 16:35:34 +0200 X-Google-Sender-Auth: DrEtEOOTcPTNQ-l4c-P8UZX6bnk Message-ID: Subject: Re: -Dtests.iters not working? To: dev@lucene.apache.org Content-Type: text/plain; charset=UTF-8 > eclipse and it worked with -Dtests.iters. I wonder why it didn't work from > cmd-line though, as testmethod is an alias to tests.method. It should work with both. > Isn't there a way to make running a single test-method still runnable with > -Dtests.iters? This is something that used to work, how come that we lost It did not work properly. It was a loop that rerun the test method but didn't really play nice with rules, hooks etc. It's virtually as if you put: for (int i = 0; i < n; i++) { invokeTestMethod(); } into another method and ran it as a test. The new option (that's part of the reason it was named slightly differently) is a real JUnit compatible test reiteration -- it picks the same or different seeds, is repeatable, invokes hooks and rules, puts every reiteration into a separate entry into reports, etc. I consider this a step forward rather than backward but of course you can argue otherwise. > ensuring that at least what used to work doesn't stop working. And also try > to avoid unnecessary changes like the tests.iter rename - it's something > that was working and we got used to it, why change? Explained above. It's not the same thing. > Now I need to adapt the way I run tests in eclipse, by never running a > single test-method, but always running classes with -Dtests.method. If this You can run a single test method and it will work identically as before as long as you don't run with multiple iterations. Multiple iterations (and parameters, and different @Seed annotations) will expand into different test names and Eclipse filters them out seeking for an exact method name match. Unfortunately this cannot be fixed or worked around, this is how JUnit is internally designed. I consider this a flaw but pushing JUnit changes is quite hard because of backcompat concerns. > is something that you can fix, I'd appreciate if you can try. No. This isn't something that I came up with overnight -- it's a tedious trial and error of what work and what doesn't. This is the best compromise I could find. > Is tests.iter(s).min back working, or is it still disabled? This was a very > useful feature too. It doesn't exist anymore. Again -- because of how JUnit is designed (tests are collected by the core before anything is run, then there is no way to interrupt execution). I could probably provide a workaround in which tests would be ignored after the first detected failure if more people miss that feature (nobody was complaining so far). Dawid --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org