mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
test: check races on rafthttp
The data race in net/http has been fixed for a while.
This commit is contained in:
parent
ba1c0a2b12
commit
01be6933c6
11
test
11
test
@ -28,16 +28,12 @@ ln -s ${PWD}/cmd/vendor $GOPATH/src
|
||||
|
||||
# Hack: gofmt ./ will recursively check the .git directory. So use *.go for gofmt.
|
||||
PKGS=`ls pkg/*/*go | cut -f1,2 -d/ | sort | uniq`
|
||||
TESTABLE_AND_FORMATTABLE="client clientv3 discovery error etcdctl/ctlv2 etcdctl/ctlv3 etcdmain etcdserver etcdserver/auth etcdserver/api/v2http etcdserver/api/v2http/httptypes $PKGS proxy/httpproxy proxy/tcpproxy raft snap storage storage/backend store version wal"
|
||||
# TODO: add it to race testing when the issue is resolved
|
||||
# https://github.com/golang/go/issues/9946
|
||||
NO_RACE_TESTABLE="rafthttp"
|
||||
FORMATTABLE="$TESTABLE_AND_FORMATTABLE $NO_RACE_TESTABLE *.go etcdctl/ integration clientv3/integration e2e alarm"
|
||||
TESTABLE_AND_FORMATTABLE="client clientv3 discovery error etcdctl/ctlv2 etcdctl/ctlv3 etcdmain etcdserver etcdserver/auth etcdserver/api/v2http etcdserver/api/v2http/httptypes $PKGS proxy/httpproxy proxy/tcpproxy raft snap storage storage/backend store version wal rafthttp"
|
||||
FORMATTABLE="$TESTABLE_AND_FORMATTABLE *.go etcdctl/ integration clientv3/integration e2e alarm"
|
||||
|
||||
# user has not provided PKG override
|
||||
if [ -z "$PKG" ]; then
|
||||
TEST=$TESTABLE_AND_FORMATTABLE
|
||||
NO_RACE_TEST=$NO_RACE_TESTABLE
|
||||
FMT=$FORMATTABLE
|
||||
|
||||
# user has provided PKG override
|
||||
@ -54,8 +50,6 @@ fi
|
||||
# split TEST into an array and prepend REPO_PATH to each local package
|
||||
split=(${TEST// / })
|
||||
TEST=${split[@]/#/${REPO_PATH}/}
|
||||
split=(${NO_RACE_TEST// / })
|
||||
NO_RACE_TEST=${split[@]/#/${REPO_PATH}/}
|
||||
MACHINE_TYPE=$(uname -m)
|
||||
if [ $MACHINE_TYPE != "armv7l" ]; then
|
||||
RACE="--race"
|
||||
@ -64,7 +58,6 @@ fi
|
||||
function unit_tests {
|
||||
echo "Running tests..."
|
||||
go test -timeout 3m ${COVER} ${RACE} -cpu 1,2,4 $@ ${TEST}
|
||||
go test -timeout 3m ${COVER} -cpu 1,2,4 $@ ${NO_RACE_TEST}
|
||||
}
|
||||
|
||||
function integration_tests {
|
||||
|
Loading…
x
Reference in New Issue
Block a user