Skip to content

Commit

Permalink
chore: upgrade Zookeeper in tests to version 3.6.1
Browse files Browse the repository at this point in the history
For SSL support, a version >= 3.5.0 is needed.  The latest as of
this writing is 3.6.1, so use that.
  • Loading branch information
James E. Blair committed Jun 22, 2020
1 parent 6bc13df commit 53b500a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ensure-zookeeper-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -e

HERE=`pwd`
ZOO_BASE_DIR="$HERE/zookeeper"
ZOOKEEPER_VERSION=${ZOOKEEPER_VERSION:-3.4.14}
ZOOKEEPER_VERSION=${ZOOKEEPER_VERSION:-3.6.1}
ZOOKEEPER_PATH="$ZOO_BASE_DIR/$ZOOKEEPER_VERSION"
ZOOKEEPER_PREFIX=${ZOOKEEPER_PREFIX}
ZOOKEEPER_SUFFIX=${ZOOKEEPER_SUFFIX}
Expand All @@ -14,8 +14,8 @@ ZOO_MIRROR_URL="http://archive.apache.org/dist"
function download_zookeeper(){
mkdir -p $ZOO_BASE_DIR
cd $ZOO_BASE_DIR
curl --silent -C - $ZOO_MIRROR_URL/zookeeper/zookeeper-$ZOOKEEPER_VERSION/${ZOOKEEPER_PREFIX}zookeeper-${ZOOKEEPER_VERSION}${ZOOKEEPER_SUFFIX}.tar.gz | tar -zx
mv ${ZOOKEEPER_PREFIX}zookeeper-${ZOOKEEPER_VERSION}${ZOOKEEPER_SUFFIX} $ZOOKEEPER_VERSION
curl --silent -C - $ZOO_MIRROR_URL/zookeeper/zookeeper-$ZOOKEEPER_VERSION/${ZOOKEEPER_PREFIX}apache-zookeeper-${ZOOKEEPER_VERSION}${ZOOKEEPER_SUFFIX}-bin.tar.gz | tar -zx
mv ${ZOOKEEPER_PREFIX}apache-zookeeper-${ZOOKEEPER_VERSION}${ZOOKEEPER_SUFFIX}-bin $ZOOKEEPER_VERSION
chmod a+x $ZOOKEEPER_PATH/bin/zkServer.sh
}

Expand Down
10 changes: 9 additions & 1 deletion kazoo/testing/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,13 @@ def classpath(self):
if self._classpath:
return self._classpath

# Two possibilities, as seen in zkEnv.sh:
# Three possibilities, as seen in zkEnv.sh:
# Check for a release - top-level zookeeper-*.jar?
jars = glob((os.path.join(
self.install_path, 'zookeeper-*.jar')))
# Later releases put zookeeper.jar in lib/
libjars = glob((os.path.join(
self.install_path, 'lib', 'zookeeper-*.jar')))
if jars:
# Release build (`ant package`)
jars.extend(glob(os.path.join(
Expand All @@ -217,6 +220,11 @@ def classpath(self):
jars.extend(glob(os.path.join(
self.install_path,
"slf4j-log4j*.jar")))
elif libjars:
# Release build (`ant package`)
jars.extend(glob(os.path.join(
self.install_path,
"lib/*.jar")))
else:
# Development build (plain `ant`)
jars = glob((os.path.join(
Expand Down

0 comments on commit 53b500a

Please sign in to comment.