forked from samuel/go-zookeeper
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding ZK 3.5 reconfig APIs (samuel#206)
* Setting up travis and builds for more than one ZK version to test against * Reorg tests to support 3.4 and 3.5 clusters * travis up to go 1.11 * Adding more go version to the matrix and allow failures for go tip and 3.5 zk * Change to always using zookeeper server scripts. Adding wait for start in test scripts * Adding waitForStop on testing helpers. Also update comments * Light test cleanup - more makefile to start to have a common set of build instructions * ZK 3.5 part 2 - Adding reconfig and incremental reconfig apis * adjust test config from 3.5 option - dont ignore 3.5 test matrix * test cases dont care if we get a connection close as we might have been connected to a node that is no longer accepting connecitons
- Loading branch information
Showing
14 changed files
with
540 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
.vscode/ | ||
.DS_Store | ||
profile.cov | ||
zookeeper | ||
zookeeper-*/ | ||
zookeeper-*.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# make file to hold the logic of build and test setup | ||
ZK_VERSION ?= 3.4.12 | ||
|
||
ZK = zookeeper-$(ZK_VERSION) | ||
ZK_URL = "https://archive.apache.org/dist/zookeeper/$(ZK)/$(ZK).tar.gz" | ||
|
||
PACKAGES := $(shell go list ./... | grep -v examples) | ||
|
||
.DEFAULT_GOAL := test | ||
|
||
$(ZK): | ||
wget $(ZK_URL) | ||
tar -zxf $(ZK).tar.gz | ||
# we link to a standard directory path so then the tests dont need to find based on version | ||
# in the test code. this allows backward compatable testing. | ||
ln -s $(ZK) zookeeper | ||
|
||
.PHONY: install-covertools | ||
install-covertools: | ||
go get github.com/mattn/goveralls | ||
go get golang.org/x/tools/cmd/cover | ||
|
||
.PHONY: setup | ||
setup: $(ZK) install-covertools | ||
|
||
.PHONY: lint | ||
lint: | ||
go fmt ./... | ||
go vet ./... | ||
|
||
.PHONY: build | ||
build: | ||
go build ./... | ||
|
||
.PHONY: test | ||
test: build | ||
go test -timeout 500s -v -race -covermode atomic -coverprofile=profile.cov $(PACKAGES) | ||
# ignore if we fail to publish coverage | ||
-goveralls -coverprofile=profile.cov -service=travis-ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.