switch some of the localhost usage to 127.0.0.1

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1386639 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2012-09-17 14:46:02 +00:00
parent d534458db7
commit 4214846719
6 changed files with 9 additions and 9 deletions

View File

@ -68,7 +68,7 @@ public class TestContentStreamDataSource extends AbstractDataImportHandlerTestCa
params.set("command", "full-import");
params.set("clean", "false");
req.setParams(params);
String url = "http://localhost:" + jetty.getLocalPort() + "/solr";
String url = "http://127.0.0.1:" + jetty.getLocalPort() + "/solr";
HttpSolrServer solrServer = new HttpSolrServer(url);
solrServer.request(req);
ModifiableSolrParams qparams = new ModifiableSolrParams();
@ -88,7 +88,7 @@ public class TestContentStreamDataSource extends AbstractDataImportHandlerTestCa
"clean", "false", UpdateParams.COMMIT, "false",
UpdateParams.COMMIT_WITHIN, "1000");
req.setParams(params);
String url = "http://localhost:" + jetty.getLocalPort() + "/solr";
String url = "http://127.0.0.1:" + jetty.getLocalPort() + "/solr";
HttpSolrServer solrServer = new HttpSolrServer(url);
solrServer.request(req);
Thread.sleep(100);

View File

@ -160,7 +160,7 @@ public class TestJdbcDataSource extends AbstractDataImportHandlerTestCase {
JdbcDataSource dataSource = new JdbcDataSource();
Properties p = new Properties();
p.put("driver", "com.mysql.jdbc.Driver");
p.put("url", "jdbc:mysql://localhost/autos");
p.put("url", "jdbc:mysql://127.0.0.1/autos");
p.put("user", "root");
p.put("password", "");

View File

@ -196,7 +196,7 @@ public class OverseerTest extends SolrTestCaseJ4 {
ZkStateReader reader = new ZkStateReader(zkClient);
reader.createClusterStateWatchersAndUpdate();
zkController = new MockZKController(server.getZkAddress(), "localhost", "collection1");
zkController = new MockZKController(server.getZkAddress(), "127.0.0.1", "collection1");
final int numShards=6;

View File

@ -82,7 +82,7 @@ public class ZkControllerTest extends SolrTestCaseJ4 {
cc = getCoreContainer();
ZkController zkController = new ZkController(cc, server.getZkAddress(), TIMEOUT, 10000,
"localhost", "8983", "solr", new CurrentCoreDescriptorProvider() {
"127.0.0.1", "8983", "solr", new CurrentCoreDescriptorProvider() {
@Override
public List<CoreDescriptor> getCurrentDescriptors() {
@ -122,7 +122,7 @@ public class ZkControllerTest extends SolrTestCaseJ4 {
cc = getCoreContainer();
zkController = new ZkController(cc, server.getZkAddress(),
TIMEOUT, 10000, "localhost", "8983", "solr", new CurrentCoreDescriptorProvider() {
TIMEOUT, 10000, "127.0.0.1", "8983", "solr", new CurrentCoreDescriptorProvider() {
@Override
public List<CoreDescriptor> getCurrentDescriptors() {

View File

@ -77,7 +77,7 @@ public class SolrCmdDistributorTest extends BaseDistributedSearchTestCase {
getSchemaFile());
jettys.add(j);
clients.add(createNewSolrServer(j.getLocalPort()));
String shardStr = "localhost:" + j.getLocalPort() + context;
String shardStr = "127.0.0.1:" + j.getLocalPort() + context;
shardsArr[i] = shardStr;
sb.append(shardStr);
}
@ -194,7 +194,7 @@ public class SolrCmdDistributorTest extends BaseDistributedSearchTestCase {
HttpSolrServer httpClient = (HttpSolrServer) c;
nodeProps = new ZkNodeProps(ZkStateReader.BASE_URL_PROP,
httpClient.getBaseURL(), ZkStateReader.CORE_NAME_PROP, "");
System.out.println("node props:" + nodeProps);
nodes.add(new StdNode(new ZkCoreNodeProps(nodeProps)));
}

View File

@ -201,7 +201,7 @@ public abstract class BaseDistributedSearchTestCase extends SolrTestCaseJ4 {
getSchemaFile());
jettys.add(j);
clients.add(createNewSolrServer(j.getLocalPort()));
String shardStr = "localhost:" + j.getLocalPort() + context;
String shardStr = "127.0.0.1:" + j.getLocalPort() + context;
shardsArr[i] = shardStr;
sb.append(shardStr);
}