Seems like I've resolved these issues: 1. A text search for "rs_A_count_gte300k.txt" throughout my IntelliJ project revealed that a file by that name was being expected by my schema.xml (thank you, blind copy/pasting). After removing the conflicting fields and a few other fields for which I didn't have data files for, I got the test to work.
2. For the second issue, I've updated this <http://stackoverflow.com/questions/25721320/assertion-error-when-running-solrtestcasej4-tests-fix-your-classpath-to-have/27166848#27166848> post with my answer, to better explain the solution. Best Regards, Nishant Kelkar On Thu, Nov 27, 2014 at 12:52 AM, Nishant Kelkar <nishant....@gmail.com> wrote: > As an additional issue related to the one above, I sometimes also get this > error (and it's pretty random, the times that I get it): > > *java.lang.AssertionError: fix your classpath to have tests-framework.jar > before lucene-core.jar* > at __randomizedtesting.SeedInfo.seed([50225DA1F52F32BB]:0) > at > org.apache.lucene.util.TestRuleSetupAndRestoreClassEnv.before(TestRuleSetupAndRestoreClassEnv.java:189) > at > org.apache.lucene.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:45) > at > org.apache.lucene.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:42) > at > com.carrotsearch.randomizedtesting.rules.SystemPropertiesInvariantRule$1.evaluate(SystemPropertiesInvariantRule.java:55) > at > com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:39) > at > com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:39) > at > com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) > at > org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:43) > at > org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:48) > at > org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:70) > at > org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:55) > at > com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36) > at > com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:358) > at java.lang.Thread.run(Thread.java:745) > > I found a related post here > <http://stackoverflow.com/questions/25721320/assertion-error-when-running-solrtestcasej4-tests-fix-your-classpath-to-have>, > but unfortunately, the accepted answer isn't clear enough to me. Any > pointers as to how to fix this would be helpful too. > > Thank you! > > Best Regards, > Nishant Kelkar > > On Thu, Nov 27, 2014 at 12:45 AM, Nishant Kelkar <nishant....@gmail.com> > wrote: > >> Hi All, >> >> I'm trying to run a simple piece of code, to get SolrTestCaseJ4 to work. >> Here's my code: >> >> public class MyTest extends SolrTestCaseJ4 { >> >> >> @BeforeClass >> public static void init() throws Exception { >> initCore("solrconfig.xml", "schema.xml"); >> lrf = h.getRequestFactory("standard", 0, 20); >> } >> >> @Test >> public void testNothing() { >> >> } >> } >> >> I have the required solrconfig.xml and schema.xml inside >> *./src/test/resources/solr/collection1/conf* >> >> However, when I run a test on testNothing() method, I get the following >> error: >> >> *java.lang.RuntimeException: java.io.IOException: Can't find resource* >> 'rs_A_count_gte300k.txt' in classpath or >> '/Users/nishantkelkar/IdeaProjects/k2/solr-component/target/test-classes/solr/collection1/conf' >> at __randomizedtesting.SeedInfo.seed([BB606BF344F3401]:0) >> at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:169) >> at >> org.apache.solr.schema.IndexSchemaFactory.create(IndexSchemaFactory.java:55) >> at >> org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:69) >> at org.apache.solr.util.TestHarness.<init>(TestHarness.java:98) >> at org.apache.solr.SolrTestCaseJ4.createCore(SolrTestCaseJ4.java:472) >> at org.apache.solr.SolrTestCaseJ4.initCore(SolrTestCaseJ4.java:464) >> at org.apache.solr.SolrTestCaseJ4.initCore(SolrTestCaseJ4.java:273) >> at org.apache.solr.SolrTestCaseJ4.initCore(SolrTestCaseJ4.java:260) >> >> What could the issue be over here? >> >> *P.S:* This is my first question on this mailing list. Pardon me if I >> haven't stuck to some convention everyone follows here! >> >> Best Regards, >> Nishant Kelkar >> > >