mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
test: activate tests on contrib/raftexample
adds contrib/raftexample to integration tests and fixes two test races
This commit is contained in:
parent
289de69632
commit
58ac6aeb5a
@ -108,10 +108,14 @@ func TestProposeOnCommit(t *testing.T) {
|
||||
}
|
||||
}
|
||||
donec <- struct{}{}
|
||||
for range cC {
|
||||
// acknowledge the commits from other nodes so
|
||||
// raft continues to make progress
|
||||
}
|
||||
}(clus.proposeC[i], clus.commitC[i], clus.errorC[i])
|
||||
|
||||
// one message feedback per node
|
||||
go func() { clus.proposeC[i] <- "foo" }()
|
||||
go func(i int) { clus.proposeC[i] <- "foo" }(i)
|
||||
}
|
||||
|
||||
for range clus.peers {
|
||||
|
1
test
1
test
@ -58,6 +58,7 @@ go test -timeout 3m ${COVER} -cpu 1,2,4 $@ ${NO_RACE_TEST}
|
||||
if [ -n "$INTEGRATION" ]; then
|
||||
echo "Running integration tests..."
|
||||
go test -timeout 10m -v -cpu 1,2,4 $@ ${REPO_PATH}/integration
|
||||
go test -timeout 1m -v -cpu 1,2,4 $@ ${REPO_PATH}/contrib/raftexample
|
||||
fi
|
||||
|
||||
echo "Checking gofmt..."
|
||||
|
Loading…
x
Reference in New Issue
Block a user