epugh commented on code in PR #3947:
URL: https://github.com/apache/solr/pull/3947#discussion_r2643131103
##########
solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTestsBase.java:
##########
@@ -49,24 +57,41 @@ public void after() {
}
}
client = null;
+ super.tearDown();
}
- @Override
- public SolrClient getSolrClient() {
+ protected SolrClient getSolrClient() {
if (client == null) {
client = createNewSolrClient();
}
return client;
}
/**
- * Create a new solr client. If createJetty was called, a http
implementation will be created,
+ * Create a new solr client. If createJetty was called, an http
implementation will be created,
* otherwise an embedded implementation will be created. Subclasses should
override for other
* options.
*/
- @Override
public SolrClient createNewSolrClient() {
- return getHttpSolrClient(getBaseUrl(), DEFAULT_TEST_CORENAME);
+ return getHttpSolrClient(solrJettyTestRule.getBaseUrl(),
DEFAULT_TEST_CORENAME);
+ }
+
+ public static HttpSolrClient getHttpSolrClient(String baseUrl, String
coreName) {
Review Comment:
It's apparently public in the parent class SolrTestCaseJ4 so I can't...
--
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]