psalagnac commented on code in PR #1810:
URL: https://github.com/apache/solr/pull/1810#discussion_r1283793370


##########
solr/core/src/test/org/apache/solr/cloud/LeaderElectionTest.java:
##########
@@ -258,8 +258,8 @@ public void testCancelElection() throws Exception {
     Thread.sleep(1000);
 
     String urlScheme = zkStateReader.getClusterProperty(URL_SCHEME, "http");
-    String url1 = Utils.getBaseUrlForNodeName("127.0.0.1:80_solr/1", 
urlScheme) + "/";
-    String url2 = Utils.getBaseUrlForNodeName("127.0.0.1:80_solr/2", 
urlScheme) + "/";
+    String url1 = Utils.getBaseUrlForNodeName("127.0.0.1:80_solr/1", 
urlScheme) + "/" + "1" + '/';

Review Comment:
   Thanks for pining me on this.
   
   This is related to other David's  
[comment](https://github.com/apache/solr/pull/1810/files/49fe85375b74cd76d7bc08bcc0d32781632bc0d6#r1279827024)
 on the path removal in `Utils.getBaseUrlForNodeName`.
   
   The change in the test does not make sense to me since the core name is here 
twice, but it is only once in the result URL. We just want to build the core 
url from the node base URL. I think it should be like this:
   
   ```
       String url1 = Utils.getBaseUrlForNodeName("127.0.0.1:80_solr", 
urlScheme) + "/1/";
   ```
   



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