Skip to content

Commit

Permalink
chore: #sonarlint and deprecations
Browse files Browse the repository at this point in the history
  • Loading branch information
ja-fra committed Sep 10, 2024
1 parent cede74f commit 2894819
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,11 @@

import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.List;
import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.SolrQuery;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.impl.HttpSolrClient;
import org.apache.solr.client.solrj.impl.HttpJdkSolrClient;
import org.apache.solr.client.solrj.request.CoreAdminRequest;
import org.apache.solr.client.solrj.response.CoreAdminResponse;
import org.apache.solr.client.solrj.response.QueryResponse;
Expand All @@ -38,7 +37,6 @@
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.lessThan;
import static org.hamcrest.Matchers.notNullValue;
import static org.junit.Assert.*;

public class VindContainerTest {

Expand Down Expand Up @@ -85,7 +83,7 @@ public void testMultipleVindCollections() throws IOException {


private void validate(VindContainer vindContainer, String coreName) throws IOException {
try (HttpSolrClient solrClient = new HttpSolrClient.Builder(vindContainer.getSolrUrl()).build()) {
try (SolrClient solrClient = new HttpJdkSolrClient.Builder(vindContainer.getSolrUrl()).build()) {

final CoreAdminResponse adminResponse = CoreAdminRequest.getStatus(coreName, solrClient);

Expand All @@ -96,7 +94,7 @@ private void validate(VindContainer vindContainer, String coreName) throws IOExc
Assert.fail(e.getMessage());
}

try (HttpSolrClient solrClient = new HttpSolrClient.Builder(vindContainer.getCoreUrl(coreName)).build()) {
try (SolrClient solrClient = new HttpJdkSolrClient.Builder(vindContainer.getCoreUrl(coreName)).build()) {
final SolrPingResponse ping = solrClient.ping();
MatcherAssert.assertThat("ping", ping.getStatus(), is(0));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void testRUOK() throws IOException {
try (ZookeeperContainer zkContainer = new ZookeeperContainer()) {
zkContainer.start();

try (Socket s = new Socket(zkContainer.getContainerIpAddress(), zkContainer.getMappedPort(ZookeeperContainer.CONNECT_PORT))) {
try (Socket s = new Socket(zkContainer.getHost(), zkContainer.getMappedPort(ZookeeperContainer.CONNECT_PORT))) {
s.setKeepAlive(true);

try (OutputStream os = s.getOutputStream()) {
Expand Down

0 comments on commit 2894819

Please sign in to comment.