lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Muir <rcm...@gmail.com>
Subject Re: Problem with SolrTestCaseJ4
Date Mon, 20 Jun 2011 11:51:42 GMT
you must use junit 4.7.x, not junit 4.8.x

On Mon, Jun 20, 2011 at 6:21 AM, Jakob Vad Nielsen
<jakobvadnielsen@gmail.com> wrote:
> Hi,
>
> I'm trying to create some integrations tests within my project using JUnit
> and the SolrTestCaseJ4 (from Solr-test-framework 3.2.0) helper class. The
> problem is that I'm getting an AssertionError for LuceneTestCase.java:
>
> java.lang.AssertionError: ensure your setUp() calls super.setUp()!!!
> at org.junit.Assert.fail(Assert.java:91)
> at org.junit.Assert.assertTrue(Assert.java:43)
>  at
> org.apache.lucene.util.LuceneTestCase$1.starting(LuceneTestCase.java:361)
> at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:46)
>  at
> org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
>  at
> org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:1206)
> at
> org.apache.lucene.util.LuceneTestCase$LuceneTestCaseRunner.runChild(LuceneTestCase.java:1124)
>  at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
>  at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
>  at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
> at
> org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
>  at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
>  at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
> at
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:71)
>  at
> com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:199)
> at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)
>  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>  at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
>
> My code goes like this:
>
> public class SolrExpressionBuilderIntegrationTest extends SolrTestCaseJ4 {
>
>    private SolrServer solrServer;
>
>    @BeforeClass
>    public static void beforeClass() throws Exception {
>        initCore("src/test/resources/solrConfig.xml",
> "src/test/resources/schema.xml", "src/test/resources");
>    }
>
>    @Test
>    public void testEmptyServer() throws Exception {
>       // test code here
>    }
>
> }
>
> Any ideas on what I'm doing wrong?
>
>
> Regards,
>
> Jakob
>

Mime
View raw message