Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 62145 invoked from network); 20 Oct 2010 13:28:04 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Oct 2010 13:28:04 -0000 Received: (qmail 37470 invoked by uid 500); 20 Oct 2010 13:28:02 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 37415 invoked by uid 500); 20 Oct 2010 13:28:02 -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 37408 invoked by uid 99); 20 Oct 2010 13:28:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Oct 2010 13:28:02 +0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of rcmuir@gmail.com designates 209.85.161.48 as permitted sender) Received: from [209.85.161.48] (HELO mail-fx0-f48.google.com) (209.85.161.48) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Oct 2010 13:27:56 +0000 Received: by fxm13 with SMTP id 13so2823609fxm.35 for ; Wed, 20 Oct 2010 06:27:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type :content-transfer-encoding; bh=JySWcS3P/YZG42LkmtDBc+UXM2aNWJNt0jv9G7RAo3w=; b=pBPTWV8z55dZH2YqS8PODB+GtfruyRfgbIvjyhcun4qLC+8iXlSmjLOg+68MtikGRU MU/Sm1itlJtHANJLTg763yHh5FmCNI3x2/iW7kPWWXSQE8uOwEGZCdfH6zytmmFebS20 YXRm+SF4Jy9N/pdk2e/Xl+pxnZMtnjJhvGAVw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=JGy0ZdGXqmCYtCgpGmxWLxOvhFW51KI4dfzQymEsPSb99LTMILbjJAnL5tHmislHrN 0xSpP0rOAKXoCxvTigS5Y071av05+fEiPOQNzYAoL9qHm+lE/QgdTtwX6f/YFx1/qItx HhRbMNfZhHHGAw7eUlVEUYoafduX0gu5aJdB8= Received: by 10.103.124.4 with SMTP id b4mr6564019mun.106.1287581253673; Wed, 20 Oct 2010 06:27:33 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.96.133 with HTTP; Wed, 20 Oct 2010 06:27:13 -0700 (PDT) In-Reply-To: <007301cb6faa$1b27d5b0$51778110$@thetaphi.de> References: <20101019161236.D80C323888FD@eris.apache.org> <007301cb6faa$1b27d5b0$51778110$@thetaphi.de> From: Robert Muir Date: Wed, 20 Oct 2010 09:27:13 -0400 Message-ID: Subject: Re: svn commit: r1024305 - in /lucene/dev/trunk/solr/src/test/org/apache/solr/core: SolrCoreTest.java TestPropInjectDefaults.java 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 On Tue, Oct 19, 2010 at 12:24 PM, Uwe Schindler wrote: > Yonik, > > Just to reduce the work you have to do: With a subclass of LuceneTestCase= , you don't need to add @Test, as the internal test runner behaves like JUn= it3 and runs all public methods starting with "test" (in addition to @Test = annotated,m which is still supported and used). We did this, as a lot of te= sts were forgotten to be upgraded correctly. Now Lucene runs on JUnit4 API = (with static @BeforeClass and all nice stuff, @Ignore, assume*,...), but no= test had to be changed :-) Also LuceneTestCase extends Assert, so no stati= c imports :-) > Well, just for thoroughness you might have to slightly change some Junit3 tests (for example, ones on very old patches). In most cases the junit3-style tests will work just fine, but there are two cases where you will get a compile error: 1. Tests that have constructors like this: public TestToken(String name) { super(name); } in this case just delete these useless constructors 2. Tests that have setUp or tearDown as protected (not public!) protected void setUp() throws Exception { ... } in this case, these must be changed to public, since setUp() is public in LuceneTestCase (and must be for the @Before to work). If this is confusing, see https://issues.apache.org/jira/browse/LUCENE-2642 for some examples of tests that were changed in this way. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org