Browse Source

Merge pull request #5086 from heyitsanthony/test-race-rafthttp

test: check races on rafthttp
Anthony Romano 9 years ago
parent
commit
f2e915f56e
1 changed files with 2 additions and 9 deletions
  1. 2 9
      test

+ 2 - 9
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.
 # Hack: gofmt ./ will recursively check the .git directory. So use *.go for gofmt.
 PKGS=`ls pkg/*/*go  | cut -f1,2 -d/ | sort | uniq`
 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
 # user has not provided PKG override
 if [ -z "$PKG" ]; then
 if [ -z "$PKG" ]; then
 	TEST=$TESTABLE_AND_FORMATTABLE
 	TEST=$TESTABLE_AND_FORMATTABLE
-	NO_RACE_TEST=$NO_RACE_TESTABLE
 	FMT=$FORMATTABLE
 	FMT=$FORMATTABLE
 
 
 # user has provided PKG override
 # 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 into an array and prepend REPO_PATH to each local package
 split=(${TEST// / })
 split=(${TEST// / })
 TEST=${split[@]/#/${REPO_PATH}/}
 TEST=${split[@]/#/${REPO_PATH}/}
-split=(${NO_RACE_TEST// / })
-NO_RACE_TEST=${split[@]/#/${REPO_PATH}/}
 MACHINE_TYPE=$(uname -m)
 MACHINE_TYPE=$(uname -m)
 if [ $MACHINE_TYPE != "armv7l" ]; then
 if [ $MACHINE_TYPE != "armv7l" ]; then
 	RACE="--race"
 	RACE="--race"
@@ -64,7 +58,6 @@ fi
 function unit_tests {
 function unit_tests {
 	echo "Running tests..."
 	echo "Running tests..."
 	go test -timeout 3m ${COVER} ${RACE} -cpu 1,2,4 $@ ${TEST}
 	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 {
 function integration_tests {