lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronak Patel <ronak2...@yahoo.com>
Subject Solr Test Framework
Date Mon, 07 Nov 2011 10:35:49 GMT


Hi,


I am trying to write JUnit Test Code for my Solr interaction and while executing I keep getting
the following errors.
Mind you, I am using JUnit 4.7 and I have been calling super.setUp().

Here is some sample code...

/* (non-Javadoc)
 * @see org.apache.solr.util.AbstractSolrTestCase#getSchemaFile()
 */
@Override
public String getSchemaFile() {
return "classpath:schema.xml";
}

/* (non-Javadoc)
 * @see org.apache.solr.util.AbstractSolrTestCase#getSolrConfigFile()
 */
@Override
public String getSolrConfigFile() {
return "classpath:solrconfig.xml";
}

@Before
@Override
public void setUp() throws Exception {
super.setUp();

this.server = new EmbeddedSolrServer(this.h.getCoreContainer(), this.h.getCore().getName());
}
}

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:413)
at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:46)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
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.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message