lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r905334 - /lucene/solr/branches/cloud/src/test/org/apache/solr/cloud/CloudStateUpdateTest.java
Date Mon, 01 Feb 2010 16:46:44 GMT
Author: markrmiller
Date: Mon Feb  1 16:46:44 2010
New Revision: 905334

URL: http://svn.apache.org/viewvc?rev=905334&view=rev
Log:
don't hardcode host in CloudStateUpdateTest

Modified:
    lucene/solr/branches/cloud/src/test/org/apache/solr/cloud/CloudStateUpdateTest.java

Modified: lucene/solr/branches/cloud/src/test/org/apache/solr/cloud/CloudStateUpdateTest.java
URL: http://svn.apache.org/viewvc/lucene/solr/branches/cloud/src/test/org/apache/solr/cloud/CloudStateUpdateTest.java?rev=905334&r1=905333&r2=905334&view=diff
==============================================================================
--- lucene/solr/branches/cloud/src/test/org/apache/solr/cloud/CloudStateUpdateTest.java (original)
+++ lucene/solr/branches/cloud/src/test/org/apache/solr/cloud/CloudStateUpdateTest.java Mon
Feb  1 16:46:44 2010
@@ -124,26 +124,28 @@
     
     ZkController zkController2 = container2.getZooKeeperController();
     
+    String host = zkController2.getHostName();
+    
     CloudState cloudState2 = zkController2.getCloudState();
     Map<String,Slice> slices = cloudState2.getSlices("testcore");
     
     assertNotNull(slices);
-    assertTrue(slices.containsKey("thequadway:8983_solr_testcore"));
+    assertTrue(slices.containsKey(host + ":8983_solr_testcore"));
     
-    Slice slice = slices.get("thequadway:8983_solr_testcore");
-    assertEquals("thequadway:8983_solr_testcore", slice.getName());
+    Slice slice = slices.get(host + ":8983_solr_testcore");
+    assertEquals(host + ":8983_solr_testcore", slice.getName());
     
     Map<String,ZkNodeProps> shards = slice.getShards();
     
     assertEquals(1, shards.size());
     
-    ZkNodeProps zkProps = shards.get("thequadway:8983_solr_testcore");
+    ZkNodeProps zkProps = shards.get(host + ":8983_solr_testcore");
     
     assertNotNull(zkProps);
     
-    assertEquals("thequadway:8983_solr", zkProps.get("node_name"));
+    assertEquals(host + ":8983_solr", zkProps.get("node_name"));
     
-    assertEquals("http://thequadway:8983/solr/testcore", zkProps.get("url"));
+    assertEquals("http://" + host + ":8983/solr/testcore", zkProps.get("url"));
     
     Set<String> liveNodes = cloudState2.getLiveNodes();
     assertNotNull(liveNodes);



Mime
View raw message