Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

functional-tester: refactor agent/tester #9513

Merged
merged 27 commits into from
Mar 30, 2018
Merged

Conversation

gyuho
Copy link
Contributor

@gyuho gyuho commented Mar 30, 2018

Old functional-tester framework:

  • Hard to extend when everything needs to be configured with flags
  • Requires manual string parsing in agent side, which makes complicated implementation
  • Hard to support more advanced agent operation (e.g. member reconfiguraton)
  • Go standard rpc package is being deprecated

This PR refactors functional-tester code, both agent and tester:

  • Typed RPC request/response to make it easier to extend
    • (Planned) support TLS
    • (Planned) membership reconfiguration
    • (Planned) failure-archive automatic uploads
    • (Planned) run failure injection testing with embedded etcd
  • Remove all flags in agent and tester
  • Keep one bi-directional stream between agent and tester (simpler)
  • Better test data/agent server clean up on test completion
  • Configure everything in YAML with more explicit field names
  • Remove unused components (e.g. v2 stressers)
cd ${GOPATH}/src/github.com/coreos/etcd
./build

./tools/functional-tester/build

./bin/etcd-agent -h
./bin/etcd-tester -h
./bin/etcd-runner -h

rm -rf /tmp/etcd-agent-data*

./bin/etcd-agent --network tcp --address 127.0.0.1:19027
./bin/etcd-agent --network tcp --address 127.0.0.1:29027
./bin/etcd-agent --network tcp --address 127.0.0.1:39027

./bin/etcd-tester --config ./tools/functional-tester/tester/local-test.yaml
make pull-docker-functional-tester -f ./hack/scripts-dev/Makefile
cd ./tools/functional-tester

# run 3 agents for 3-node local etcd cluster
./scripts/docker-local-agent.sh 1
./scripts/docker-local-agent.sh 2
./scripts/docker-local-agent.sh 3

./scripts/docker-local-tester.sh

Doesn't change any agent/tester(stresser) logic.
Preliminary work to support TLS tests #8943.

gyuho added 19 commits March 29, 2018 11:31
Signed-off-by: Gyuho Lee <[email protected]>
@codecov-io
Copy link

Codecov Report

Merging #9513 into master will decrease coverage by 0.11%.
The diff coverage is 62.01%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #9513      +/-   ##
==========================================
- Coverage    72.5%   72.39%   -0.12%     
==========================================
  Files         366      366              
  Lines       31000    31128     +128     
==========================================
+ Hits        22476    22534      +58     
- Misses       6891     6969      +78     
+ Partials     1633     1625       -8
Impacted Files Coverage Δ
pkg/transport/proxy.go 59.15% <62.01%> (+1.36%) ⬆️
client/client.go 57.84% <0%> (-26.8%) ⬇️
etcdctl/ctlv3/command/auth_command.go 59.09% <0%> (-11.37%) ⬇️
proxy/grpcproxy/register.go 80.55% <0%> (-2.78%) ⬇️
etcdserver/api/v3election/election.go 66.66% <0%> (-2.78%) ⬇️
proxy/grpcproxy/lease.go 78.28% <0%> (-2.27%) ⬇️
proxy/grpcproxy/watch.go 86.33% <0%> (-1.25%) ⬇️
etcdserver/v3_server.go 79.17% <0%> (-0.78%) ⬇️
clientv3/watch.go 95.34% <0%> (-0.5%) ⬇️
clientv3/balancer/grpc1.7-health.go 86.33% <0%> (ø) ⬆️
... and 16 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8767e39...048a1b1. Read the comment docs.

@gyuho gyuho merged commit 93fec5e into etcd-io:master Mar 30, 2018
@gyuho gyuho deleted the functional-tester branch March 30, 2018 23:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants