You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by GitBox <gi...@apache.org> on 2022/12/28 11:03:44 UTC

[GitHub] [solr] joshgog commented on a diff in pull request #1218: SOLR-16573:SolrClientTestRule for EmbeddedSolrServer

joshgog commented on code in PR #1218:
URL: https://github.com/apache/solr/pull/1218#discussion_r1058265485


##########
solr/solrj/src/test/org/apache/solr/client/solrj/GetByIdTest.java:
##########
@@ -30,15 +35,19 @@ public class GetByIdTest extends EmbeddedSolrServerTestBase {
 
   @BeforeClass
   public static void beforeClass() throws Exception {
-    initCore();
+    solrClientTestRule
+        .build()
+        .setSolrHome(Paths.get(SolrJettyTestBase.legacyExampleCollection1SolrHome()))
+        .init();
   }
 
   @Before
   @Override
   public void setUp() throws Exception {
     super.setUp();
-    getSolrClient().deleteByQuery("*:*");
-    getSolrClient()
+    solrClientTestRule.getSolrClient().deleteByQuery("*:*");
+    solrClientTestRule
+        .getSolrClient()

Review Comment:
   Should I define getSolrClient() in EmbeddedSolrServerTestBase to return the client created in the test rule or I should revert to how it was defined initially?



-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org