You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zookeeper.apache.org by ph...@apache.org on 2017/11/22 20:16:37 UTC

zookeeper git commit: ZOOKEEPER-2948: Failing c unit tests on apache jenkins - fix the config.

Repository: zookeeper
Updated Branches:
  refs/heads/master 81fe5262f -> 748585d20


ZOOKEEPER-2948: Failing c unit tests on apache jenkins - fix the config.

Missed the quorum.cfg file which also needs to be updated for the new location.

Change-Id: Ifa65812c2b9c3e11b3f2137aa4d471964c5b4ad6


Project: http://git-wip-us.apache.org/repos/asf/zookeeper/repo
Commit: http://git-wip-us.apache.org/repos/asf/zookeeper/commit/748585d2
Tree: http://git-wip-us.apache.org/repos/asf/zookeeper/tree/748585d2
Diff: http://git-wip-us.apache.org/repos/asf/zookeeper/diff/748585d2

Branch: refs/heads/master
Commit: 748585d200da3a137f6ee37ee543d4f32c30d9c6
Parents: 81fe526
Author: Patrick Hunt <ph...@apache.org>
Authored: Wed Nov 22 12:13:55 2017 -0800
Committer: Patrick Hunt <ph...@apache.org>
Committed: Wed Nov 22 12:13:55 2017 -0800

----------------------------------------------------------------------
 src/c/tests/quorum.cfg  | 2 +-
 src/c/tests/zkServer.sh | 9 ++++++---
 2 files changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zookeeper/blob/748585d2/src/c/tests/quorum.cfg
----------------------------------------------------------------------
diff --git a/src/c/tests/quorum.cfg b/src/c/tests/quorum.cfg
index aa2dd8c..cb0aa81 100644
--- a/src/c/tests/quorum.cfg
+++ b/src/c/tests/quorum.cfg
@@ -1,7 +1,7 @@
 tickTime=500
 initLimit=10
 syncLimit=5
-dataDir=/tmp/zkdata
+dataDir=TMPDIR/zkdata
 clientPort=22181
 server.1=localhost:22881:33881
 server.2=localhost:22882:33882

http://git-wip-us.apache.org/repos/asf/zookeeper/blob/748585d2/src/c/tests/zkServer.sh
----------------------------------------------------------------------
diff --git a/src/c/tests/zkServer.sh b/src/c/tests/zkServer.sh
index b19e870..64e5a04 100755
--- a/src/c/tests/zkServer.sh
+++ b/src/c/tests/zkServer.sh
@@ -157,11 +157,14 @@ startReadOnly)
         echo "this target is for unit tests only"
         exit 2
     else
-        mkdir -p "${base_dir}/build/tmp/zkdata"
-        rm -f "${base_dir}/build/tmp/zkdata/myid" && echo 1 > "${base_dir}/build/tmp/zkdata/myid"
+        tmpdir="${base_dir}/build/tmp"
+        mkdir -p "${tmpdir}/zkdata"
+        rm -f "${tmpdir}/zkdata/myid" && echo 1 > "${tmpdir}/zkdata/myid"
+
+        sed "s#TMPDIR#${tmpdir}#g" ${base_dir}/src/c/tests/quorum.cfg > "${tmpdir}/quorum.cfg"
 
         # force read-only mode
-        java -cp "$CLASSPATH" -Dreadonlymode.enabled=true org.apache.zookeeper.server.quorum.QuorumPeerMain ${base_dir}/src/c/tests/quorum.cfg &> "${base_dir}/build/tmp/zk.log" &
+        java -cp "$CLASSPATH" -Dreadonlymode.enabled=true org.apache.zookeeper.server.quorum.QuorumPeerMain ${tmpdir}/quorum.cfg &> "${tmpdir}/zk.log" &
         pid=$!
         echo -n $pid > "${base_dir}/build/tmp/zk.pid"
         sleep 3 # wait until read-only server is up