[GitHub] zookeeper pull request #579: [ZOOKEEPER-3095] Connect string fix for non-exi...
Github user asfgit closed the pull request at: https://github.com/apache/zookeeper/pull/579 ---
[GitHub] zookeeper pull request #579: [ZOOKEEPER-3095] Connect string fix for non-exi...
Github user lvfangmin commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/579#discussion_r205924496 --- Diff: src/c/tests/zkServer.sh --- @@ -77,7 +77,7 @@ fi if [ "x${base_dir}" == "x" ] then -zk_base="../../" +zk_base="../../../" --- End diff -- Yes, seems the old code is not working if the base_dir is not specified. We were using this to test the change manually, so it's related from testing purpose. ---
[GitHub] zookeeper pull request #579: [ZOOKEEPER-3095] Connect string fix for non-exi...
Github user breed commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/579#discussion_r205666254 --- Diff: src/c/tests/zkServer.sh --- @@ -77,7 +77,7 @@ fi if [ "x${base_dir}" == "x" ] then -zk_base="../../" +zk_base="../../../" --- End diff -- and is it related to this change? ;) ---
[GitHub] zookeeper pull request #579: [ZOOKEEPER-3095] Connect string fix for non-exi...
Github user breed commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/579#discussion_r205666234 --- Diff: src/c/tests/zkServer.sh --- @@ -77,7 +77,7 @@ fi if [ "x${base_dir}" == "x" ] then -zk_base="../../" +zk_base="../../../" --- End diff -- is this correct? how did this work before? ---
[GitHub] zookeeper pull request #579: [ZOOKEEPER-3095] Connect string fix for non-exi...
Github user breed commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/579#discussion_r205666190 --- Diff: src/c/tests/TestClient.cc --- @@ -325,7 +326,17 @@ class Zookeeper_simpleSystem : public CPPUNIT_NS::TestFixture CPPUNIT_ASSERT(zk != 0); CPPUNIT_ASSERT(ctx.waitForConnected(zk)); } - + +/* Checks that a non-existent host will not block the connection*/ +void testNonexistentHost() { + char hosts[] = "jimmy:,127.0.0.1:22181"; + watchctx_t ctx; --- End diff -- 4 space indent ---
[GitHub] zookeeper pull request #579: [ZOOKEEPER-3095] Connect string fix for non-exi...
Github user breed commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/579#discussion_r205666180 --- Diff: src/c/src/zookeeper.c --- @@ -842,11 +842,16 @@ static int resolve_hosts(const zhandle_t *zh, const char *hosts_in, addrvec_t *a } freeaddrinfo(res0); - +next: host = strtok_r(0, ",", _last); } #endif } +if (avec->count == 0) { + rc = ZSYSTEMERROR; // not a single host resolved --- End diff -- 4 space indent ;) ---