laminelam commented on code in PR #1508:
URL: https://github.com/apache/solr/pull/1508#discussion_r1194505800


##########
solr/solrj-zookeeper/src/test/org/apache/solr/common/cloud/SolrZkClientTest.java:
##########
@@ -281,4 +282,42 @@ public void testCheckInterrupted() {
     SolrZkClient.checkInterrupted(new InterruptedException());
     assertTrue(Thread.currentThread().isInterrupted());
   }
+
+  @Test
+  public void testWithSolrResourceLoader() {
+    setupSystemProperties();
+    SolrResourceLoader solrResourceLoader =
+        new SolrResourceLoader(Path.of("."), 
ClassLoader.getSystemClassLoader());
+    new SolrZkClient.Builder()
+        .withUrl(zkServer.getZkHost())
+        .withTimeout(AbstractZkTestCase.TIMEOUT, TimeUnit.MILLISECONDS)
+        .withSolrClassLoader(solrResourceLoader)
+        .build()
+        .close(); // no more tests needed. We only test class instantiation
+    clearSystemProperties();

Review Comment:
   Thanks @gerlowskija , didn't know that _SystemPropertiesRestoreRule_ was 
part of _SolrTestCase_
   Actually I followed the existing style, as I have seen this logic used in 
other classes.
   Removed it.
   Updated changes.txt file as well.
   Thank you for your time on this



-- 
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-unsubscr...@solr.apache.org

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


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

Reply via email to