Copilot commented on code in PR #3947:
URL: https://github.com/apache/solr/pull/3947#discussion_r2653026831


##########
solr/core/src/test/org/apache/solr/update/CustomTLogDirTest.java:
##########
@@ -34,20 +34,20 @@
 public class CustomTLogDirTest extends SolrTestCaseJ4 {
 
   @ClassRule
-  public static final SolrClientTestRule solrClientTestRule =
+  public static final SolrClientTestRule solrTestRule =

Review Comment:
   Inconsistent naming: This file uses `solrClientTestRule` for the rule name, 
while most other migrated files use `solrTestRule`. This inconsistency makes 
the codebase harder to maintain.



##########
solr/test-framework/src/java/org/apache/solr/util/SolrClientTestRule.java:
##########
@@ -79,9 +79,14 @@ public NewCollectionBuilder withConfigSet(String configSet) {
         if (configSet.endsWith(confSuffix)) {
           configSet = configSet.substring(0, configSet.length() - 
confSuffix.length());
         }
+        this.configSet = configSet;

Review Comment:
   The assignment `this.configSet = configSet;` has been moved inside the 
conditional block. If the configSet doesn't end with the confSuffix, this field 
will not be set, which could cause the configSet to remain uninitialized or 
keep its previous value.



##########
solr/core/src/test/org/apache/solr/update/CustomTLogDirTest.java:
##########
@@ -34,20 +34,20 @@
 public class CustomTLogDirTest extends SolrTestCaseJ4 {
 
   @ClassRule
-  public static final SolrClientTestRule solrClientTestRule =
+  public static final SolrClientTestRule solrTestRule =
       new EmbeddedSolrServerTestRule() {
         @Override
         protected void before() {
           System.setProperty("solr.directoryFactory", 
"solr.NRTCachingDirectoryFactory");
-          solrClientTestRule.startSolr(LuceneTestCase.createTempDir());
+          solrTestRule.startSolr(LuceneTestCase.createTempDir());

Review Comment:
   The `solrClientTestRule.startSolr()` call is using the wrong rule name - it 
should be `solrTestRule.startSolr()` to match the field name on line 37.



-- 
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]

Reply via email to