Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 86267 invoked from network); 28 Apr 2010 23:10:27 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Apr 2010 23:10:27 -0000 Received: (qmail 82439 invoked by uid 500); 28 Apr 2010 23:10:25 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 82401 invoked by uid 500); 28 Apr 2010 23:10:25 -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 82394 invoked by uid 99); 28 Apr 2010 23:10:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Apr 2010 23:10:25 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [208.69.42.181] (HELO radix.cryptio.net) (208.69.42.181) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Apr 2010 23:10:18 +0000 Received: by radix.cryptio.net (Postfix, from userid 1007) id 4765271C75C; Wed, 28 Apr 2010 16:09:57 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by radix.cryptio.net (Postfix) with ESMTP id 4515571C15A for ; Wed, 28 Apr 2010 16:09:57 -0700 (PDT) Date: Wed, 28 Apr 2010 16:09:57 -0700 (PDT) From: Chris Hostetter To: Lucene Dev Subject: Re: Solr JUnit test methods steping on eachother? In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Checked: Checked by ClamAV on apache.org : 1) am i understanding "beforeClass" correctly? : 2) if so, then how is the current setup suppose to ensure that testAAA : doesn't leave garbase arround that screws up testBBB ? After skimming the JUnit annotation docs and experimenting, it looks like the SolrCore is definitely getting reused, and i was able to clean up the existing index by adding this to the test class... @After public void after() throws Exception { assertU(delQ("*:*")); assertU(commit()); } ...if reusing the SolreCore for each "test" method was deliberate, then shouldn't something like this be in the base class? I still can't make sense of why this particular patch caused this particular failure -- none of hte docs i added had the field facet.prefix was being used on... : 3) even if the anwer to #2 is "we don't ensure that" then how is my new test : method screwing things up in a way that the other exsiting test methods aren't : ? ... : Patch.... : : Index: src/test/org/apache/solr/request/SimpleFacetsTest.java : =================================================================== : --- src/test/org/apache/solr/request/SimpleFacetsTest.java (revision : 939066) : +++ src/test/org/apache/solr/request/SimpleFacetsTest.java (working copy) : @@ -390,6 +390,31 @@ : } : : @Test : + public void testDateFacetsWithIncludeOption() { : + final String f = "bday"; : + final String pre = "//lst[@name='facet_dates']/lst[@name='"+f+"']"; : + : + // similar to testDateFacets : + final String ooo = "00:00:00.000Z"; : + : + assertU(adoc("id", "0", f, "1900-01-01T"+ooo)); : + assertU(commit()); : + assertU(adoc("id", "1", f, "1976-07-01T"+ooo)); : + assertU(adoc("id", "2", f, "1976-07-04T"+ooo)); : + assertU(adoc("id", "3", f, "1976-07-05T"+ooo)); : + assertU(adoc("id", "4", f, "1976-07-05T00:07:67.890Z")); : + assertU(commit()); : + assertU(adoc("id", "5", f, "1976-07-07T"+ooo)); : + assertU(adoc("id", "6", f, "1976-07-13T"+ooo)); : + assertU(adoc("id", "7", f, "1976-07-13T00:07:67.890Z")); : + assertU(adoc("id", "8", f, "1976-07-15T15:15:15.155Z")); : + assertU(commit()); : + assertU(adoc("id", "9", f, "2000-01-01T"+ooo)); : + assertU(commit()); : + } : + : + : + @Test : public void testFacetMultiValued() { : doFacetPrefix("t_s", "facet.method","enum"); : doFacetPrefix("t_s", "facet.method", "enum", "facet.enum.cache.minDf", : "2"); : : : --------------------------------------------------------------------- : To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org : For additional commands, e-mail: dev-help@lucene.apache.org : -Hoss --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org