epugh commented on code in PR #1218:
URL: https://github.com/apache/solr/pull/1218#discussion_r1096790762
##########
solr/solrj/src/test/org/apache/solr/client/solrj/request/SolrPingTest.java:
##########
@@ -31,18 +30,18 @@ public class SolrPingTest extends
EmbeddedSolrServerTestBase {
@BeforeClass
public static void beforeClass() throws Exception {
- File testHome = createTempDir().toFile();
- FileUtils.copyDirectory(getFile("solrj/solr"), testHome);
- initCore("solrconfig.xml", "schema.xml", testHome.getAbsolutePath(),
"collection1");
+
solrClientTestRule.startSolr(SolrTestCaseJ4.getFile("solrj/solr").toPath());
+
+ SolrTestCaseJ4.newRandomConfig();
+
solrClientTestRule.newCollection().withConfigSet("../collection1").create();
}
@Before
@Override
public void setUp() throws Exception {
super.setUp();
- clearIndex();
- assertU(commit());
- assertU(optimize());
+ solrClientTestRule.clearIndex();
Review Comment:
maybe a nit pick, but do we need to do this kind of clean up in our
before's? Shouldn't the overall framework take care of having a clean index?
I would hope that every test would start with an empty index right?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]