Skip to content

Commit bf42cd3

Browse files
committed
Add endpoint URL to Solr URL
1 parent faa80d2 commit bf42cd3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/com/ibm/watson/developer_cloud/retrieve_and_rank/v1/RetrieveAndRank.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ public SolrClusterList getSolrClusters() {
321321
* @return URL to access Solr
322322
*/
323323
public String getSolrUrl(String solrClusterId) {
324-
return String.format(PATH_SOLR, solrClusterId);
324+
return getEndPoint() + String.format(PATH_SOLR, solrClusterId);
325325
}
326326

327327
/**

src/test/java/com/ibm/watson/developer_cloud/retrieve_and_rank/v1/RetrieveAndRankIntegrationTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ public void testGetSolrClusters() {
190190
@Test
191191
public void testGetSolrUrl() {
192192
final String solrUrl = service.getSolrUrl(clusterId);
193-
final String expectedUrl = "/solr_clusters/" + clusterId + "/solr";
194-
assertTrue(solrUrl.endsWith(expectedUrl));
193+
final String expectedUrl = service.getEndPoint() + "/v1/solr_clusters/" + clusterId + "/solr";
194+
assertEquals(expectedUrl, solrUrl);
195195
}
196196

197197
@Test

0 commit comments

Comments
 (0)