accumulo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From milleruntime <...@git.apache.org>
Subject [GitHub] accumulo pull request #232: ACCUMULO-4600: Fix to properly read from accumul...
Date Thu, 09 Mar 2017 15:01:23 GMT
Github user milleruntime commented on a diff in the pull request:

    https://github.com/apache/accumulo/pull/232#discussion_r105182870
  
    --- Diff: shell/src/test/java/org/apache/accumulo/shell/ShellConfigTest.java ---
    @@ -123,29 +118,21 @@ public void testTokenAndOptionAndPassword() throws IOException {
       @Test
       public void testZooKeeperHostFallBackToSite() throws Exception {
         ClientConfiguration clientConfig = new ClientConfiguration();
    -    Map<String,String> data = new HashMap<>();
    -    data.put(Property.INSTANCE_ZK_HOST.getKey(), "site_hostname");
    -    AccumuloConfiguration conf = new ConfigurationCopy(data);
    -    assertEquals("site_hostname", Shell.getZooKeepers(null, clientConfig));
    +    assertFalse("Client config contains zk hosts", clientConfig.containsKey(ClientConfiguration.ClientProperty.INSTANCE_ZK_HOST.getKey()));
    +    assertEquals("localhost:2181", Shell.getZooKeepers(null, clientConfig));
    --- End diff --
    
    It does not seem that way but the last resort of `Shell.getZooKeepers()` is to make a
static call to get the site configuration:
    `SiteConfiguration.getInstance(ClientContext.convertClientConfig(clientConfig)).get(Property.INSTANCE_ZK_HOST)`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message