On 06/20/2011 01:51 PM, Robert Muir wrote: > you must use junit 4.7.x, not junit 4.8.x Is there a way around this?
Depending on a specific Junit version is bound to cause problems when working with other packages. For example Spring 2.5.6 testframework does not work newer junit versions than 4.4. Kind regards, Tarjei > On Mon, Jun 20, 2011 at 6:21 AM, Jakob Vad Nielsen > <jakobvadniel...@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 >> -- Regards / Med vennlig hilsen Tarjei Huse Mobil: 920 63 413