28 Commits

Author SHA1 Message Date
Piotr Tabor
36f07cb591 functional/tester: Update cluster_test.go to reflect current content of functional.yaml.
Before the change:

.../etcd/functional% go test -v ./...
...
?   	go.etcd.io/etcd/v3/functional/runner	[no test files]
=== RUN   Test_read
{"level":"info","ts":1596018672.2852418,"caller":"tester/cluster_read_config.go:36","msg":"opened configuration file","path":"../../functional.yaml"}
    Test_read: cluster_test.go:269: expected &{lg:<nil> agentConns:[] agentClients:[] agentStreams:[] agentRequests:[] testerHTTPServer:<nil> Members:[EtcdExec:"./bin/etcd" AgentAddr:"127.0.0.1:19027" FailpointHTTPAddr:"http://127.0.0.1:7381" BaseDir:"/tmp/etcd-functional-1" EtcdPeerProxy:true EtcdClientEndpoint:"127.0.0.1:1379" Etcd:<Name:"s1" DataDir:"/tmp/etcd-functional-1/etcd.data" WALDir:"/tmp/etcd-functional-1/etcd.data/member/wal" HeartbeatIntervalMs:100 ElectionTimeoutMs:1000 ListenClientURLs:"https://127.0.0.1:1379" AdvertiseClientURLs:"https://127.0.0.1:1379" ClientAutoTLS:true ListenPeerURLs:"https://127.0.0.1:1380" AdvertisePeerURLs:"https://127.0.0.1:1381" PeerAutoTLS:true InitialCluster:"s1=https://127.0.0.1:1381,s2=https://127.0.0.1:2381,s3=https://127.0.0.1:3381" InitialClusterState:"new" InitialClusterToken:"tkn" SnapshotCount:10000 QuotaBackendBytes:10740000000 PreVote:true InitialCorruptCheck:true Logger:"zap" LogOutputs:"/tmp/etcd-functional-1/etcd.log" > SnapshotPath:"/tmp/etcd-functional-1.snapshot.db"  EtcdExec:"./bin/etcd" AgentAddr:"127.0.0.1:29027" FailpointHTTPAddr:"http://127.0.0.1:7382" BaseDir:"/tmp/etcd-functional-2" EtcdPeerProxy:true EtcdClientEndpoint:"127.0.0.1:2379" Etcd:<Name:"s2" DataDir:"/tmp/etcd-functional-2/etcd.data" WALDir:"/tmp/etcd-functional-2/etcd.data/member/wal" HeartbeatIntervalMs:100 ElectionTimeoutMs:1000 ListenClientURLs:"https://127.0.0.1:2379" AdvertiseClientURLs:"https://127.0.0.1:2379" ClientAutoTLS:true ListenPeerURLs:"https://127.0.0.1:2380" AdvertisePeerURLs:"https://127.0.0.1:2381" PeerAutoTLS:true InitialCluster:"s1=https://127.0.0.1:1381,s2=https://127.0.0.1:2381,s3=https://127.0.0.1:3381" InitialClusterState:"new" InitialClusterToken:"tkn" SnapshotCount:10000 QuotaBackendBytes:10740000000 PreVote:true InitialCorruptCheck:true Logger:"zap" LogOutputs:"/tmp/etcd-functional-2/etcd.log" > SnapshotPath:"/tmp/etcd-functional-2.snapshot.db"  EtcdExec:"./bin/etcd" AgentAddr:"127.0.0.1:39027" FailpointHTTPAddr:"http://127.0.0.1:7383" BaseDir:"/tmp/etcd-functional-3" EtcdPeerProxy:true EtcdClientEndpoint:"127.0.0.1:3379" Etcd:<Name:"s3" DataDir:"/tmp/etcd-functional-3/etcd.data" WALDir:"/tmp/etcd-functional-3/etcd.data/member/wal" HeartbeatIntervalMs:100 ElectionTimeoutMs:1000 ListenClientURLs:"https://127.0.0.1:3379" AdvertiseClientURLs:"https://127.0.0.1:3379" ClientAutoTLS:true ListenPeerURLs:"https://127.0.0.1:3380" AdvertisePeerURLs:"https://127.0.0.1:3381" PeerAutoTLS:true InitialCluster:"s1=https://127.0.0.1:1381,s2=https://127.0.0.1:2381,s3=https://127.0.0.1:3381" InitialClusterState:"new" InitialClusterToken:"tkn" SnapshotCount:10000 QuotaBackendBytes:10740000000 PreVote:true InitialCorruptCheck:true Logger:"zap" LogOutputs:"/tmp/etcd-functional-3/etcd.log" > SnapshotPath:"/tmp/etcd-functional-3.snapshot.db" ] Tester:DataDir:"/tmp/etcd-tester-data" Network:"tcp" Addr:"127.0.0.1:9028" DelayLatencyMs:5000 DelayLatencyMsRv:500 UpdatedDelayLatencyMs:5000 RoundLimit:1 ExitOnCaseFail:true EnablePprof:true CaseDelayMs:7000 CaseShuffle:true Cases:"SIGTERM_ONE_FOLLOWER" Cases:"SIGTERM_ONE_FOLLOWER_UNTIL_TRIGGER_SNAPSHOT" Cases:"SIGTERM_LEADER" Cases:"SIGTERM_LEADER_UNTIL_TRIGGER_SNAPSHOT" Cases:"SIGTERM_QUORUM" Cases:"SIGTERM_ALL" Cases:"SIGQUIT_AND_REMOVE_ONE_FOLLOWER" Cases:"SIGQUIT_AND_REMOVE_ONE_FOLLOWER_UNTIL_TRIGGER_SNAPSHOT" Cases:"BLACKHOLE_PEER_PORT_TX_RX_LEADER" Cases:"BLACKHOLE_PEER_PORT_TX_RX_LEADER_UNTIL_TRIGGER_SNAPSHOT" Cases:"BLACKHOLE_PEER_PORT_TX_RX_QUORUM" Cases:"BLACKHOLE_PEER_PORT_TX_RX_ALL" Cases:"DELAY_PEER_PORT_TX_RX_LEADER" Cases:"RANDOM_DELAY_PEER_PORT_TX_RX_LEADER" Cases:"DELAY_PEER_PORT_TX_RX_LEADER_UNTIL_TRIGGER_SNAPSHOT" Cases:"RANDOM_DELAY_PEER_PORT_TX_RX_LEADER_UNTIL_TRIGGER_SNAPSHOT" Cases:"DELAY_PEER_PORT_TX_RX_QUORUM" Cases:"RANDOM_DELAY_PEER_PORT_TX_RX_QUORUM" Cases:"DELAY_PEER_PORT_TX_RX_ALL" Cases:"RANDOM_DELAY_PEER_PORT_TX_RX_ALL" Cases:"NO_FAIL_WITH_STRESS" Cases:"NO_FAIL_WITH_NO_STRESS_FOR_LIVENESS" FailpointCommands:"panic(\"etcd-tester\")" RunnerExecPath:"./bin/etcd-runner" Stressers:<Type:"KV_WRITE_SMALL" Weight:0.35 > Stressers:<Type:"KV_WRITE_LARGE" Weight:0.002 > Stressers:<Type:"KV_READ_ONE_KEY" Weight:0.07 > Stressers:<Type:"KV_READ_RANGE" Weight:0.07 > Stressers:<Type:"KV_DELETE_ONE_KEY" Weight:0.07 > Stressers:<Type:"KV_DELETE_RANGE" Weight:0.07 > Stressers:<Type:"KV_TXN_WRITE_DELETE" Weight:0.35 > Stressers:<Type:"LEASE" > Checkers:"KV_HASH" Checkers:"LEASE_EXPIRE" StressKeySize:100 StressKeySizeLarge:32769 StressKeySuffixRange:250000 StressKeySuffixRangeTxn:100 StressKeyTxnOps:10 StressClients:100 StressQPS:2000  cases:[] rateLimiter:<nil> stresser:<nil> checkers:[] currentRevision:0 rd:0 cs:0}, got &{lg:<nil> agentConns:[] agentClients:[] agentStreams:[] agentRequests:[] testerHTTPServer:<nil> Members:[EtcdExec:"./bin/etcd" AgentAddr:"127.0.0.1:19027" FailpointHTTPAddr:"http://127.0.0.1:7381" BaseDir:"/tmp/etcd-functional-1" EtcdPeerProxy:true EtcdClientEndpoint:"127.0.0.1:1379" Etcd:<Name:"s1" DataDir:"/tmp/etcd-functional-1/etcd.data" WALDir:"/tmp/etcd-functional-1/etcd.data/member/wal" HeartbeatIntervalMs:100 ElectionTimeoutMs:1000 ListenClientURLs:"https://127.0.0.1:1379" AdvertiseClientURLs:"https://127.0.0.1:1379" ClientAutoTLS:true ListenPeerURLs:"https://127.0.0.1:1380" AdvertisePeerURLs:"https://127.0.0.1:1381" PeerAutoTLS:true InitialCluster:"s1=https://127.0.0.1:1381,s2=https://127.0.0.1:2381,s3=https://127.0.0.1:3381" InitialClusterState:"new" InitialClusterToken:"tkn" SnapshotCount:2000 QuotaBackendBytes:10740000000 PreVote:true InitialCorruptCheck:true Logger:"zap" LogOutputs:"/tmp/etcd-functional-1/etcd.log" LogLevel:"info" > SnapshotPath:"/tmp/etcd-functional-1.snapshot.db"  EtcdExec:"./bin/etcd" AgentAddr:"127.0.0.1:29027" FailpointHTTPAddr:"http://127.0.0.1:7382" BaseDir:"/tmp/etcd-functional-2" EtcdPeerProxy:true EtcdClientEndpoint:"127.0.0.1:2379" Etcd:<Name:"s2" DataDir:"/tmp/etcd-functional-2/etcd.data" WALDir:"/tmp/etcd-functional-2/etcd.data/member/wal" HeartbeatIntervalMs:100 ElectionTimeoutMs:1000 ListenClientURLs:"https://127.0.0.1:2379" AdvertiseClientURLs:"https://127.0.0.1:2379" ClientAutoTLS:true ListenPeerURLs:"https://127.0.0.1:2380" AdvertisePeerURLs:"https://127.0.0.1:2381" PeerAutoTLS:true InitialCluster:"s1=https://127.0.0.1:1381,s2=https://127.0.0.1:2381,s3=https://127.0.0.1:3381" InitialClusterState:"new" InitialClusterToken:"tkn" SnapshotCount:2000 QuotaBackendBytes:10740000000 PreVote:true InitialCorruptCheck:true Logger:"zap" LogOutputs:"/tmp/etcd-functional-2/etcd.log" LogLevel:"info" > SnapshotPath:"/tmp/etcd-functional-2.snapshot.db"  EtcdExec:"./bin/etcd" AgentAddr:"127.0.0.1:39027" FailpointHTTPAddr:"http://127.0.0.1:7383" BaseDir:"/tmp/etcd-functional-3" EtcdPeerProxy:true EtcdClientEndpoint:"127.0.0.1:3379" Etcd:<Name:"s3" DataDir:"/tmp/etcd-functional-3/etcd.data" WALDir:"/tmp/etcd-functional-3/etcd.data/member/wal" HeartbeatIntervalMs:100 ElectionTimeoutMs:1000 ListenClientURLs:"https://127.0.0.1:3379" AdvertiseClientURLs:"https://127.0.0.1:3379" ClientAutoTLS:true ListenPeerURLs:"https://127.0.0.1:3380" AdvertisePeerURLs:"https://127.0.0.1:3381" PeerAutoTLS:true InitialCluster:"s1=https://127.0.0.1:1381,s2=https://127.0.0.1:2381,s3=https://127.0.0.1:3381" InitialClusterState:"new" InitialClusterToken:"tkn" SnapshotCount:2000 QuotaBackendBytes:10740000000 PreVote:true InitialCorruptCheck:true Logger:"zap" LogOutputs:"/tmp/etcd-functional-3/etcd.log" LogLevel:"info" > SnapshotPath:"/tmp/etcd-functional-3.snapshot.db" ] Tester:DataDir:"/tmp/etcd-tester-data" Network:"tcp" Addr:"127.0.0.1:9028" DelayLatencyMs:5000 DelayLatencyMsRv:500 UpdatedDelayLatencyMs:5000 RoundLimit:1 ExitOnCaseFail:true EnablePprof:true CaseDelayMs:7000 CaseShuffle:true Cases:"SIGTERM_ONE_FOLLOWER" Cases:"SIGTERM_ONE_FOLLOWER_UNTIL_TRIGGER_SNAPSHOT" Cases:"SIGTERM_LEADER" Cases:"SIGTERM_LEADER_UNTIL_TRIGGER_SNAPSHOT" Cases:"SIGTERM_QUORUM" Cases:"SIGTERM_ALL" Cases:"SIGQUIT_AND_REMOVE_ONE_FOLLOWER" Cases:"SIGQUIT_AND_REMOVE_ONE_FOLLOWER_UNTIL_TRIGGER_SNAPSHOT" Cases:"BLACKHOLE_PEER_PORT_TX_RX_LEADER" Cases:"BLACKHOLE_PEER_PORT_TX_RX_LEADER_UNTIL_TRIGGER_SNAPSHOT" Cases:"BLACKHOLE_PEER_PORT_TX_RX_QUORUM" Cases:"BLACKHOLE_PEER_PORT_TX_RX_ALL" Cases:"DELAY_PEER_PORT_TX_RX_LEADER" Cases:"RANDOM_DELAY_PEER_PORT_TX_RX_LEADER" Cases:"DELAY_PEER_PORT_TX_RX_LEADER_UNTIL_TRIGGER_SNAPSHOT" Cases:"RANDOM_DELAY_PEER_PORT_TX_RX_LEADER_UNTIL_TRIGGER_SNAPSHOT" Cases:"DELAY_PEER_PORT_TX_RX_QUORUM" Cases:"RANDOM_DELAY_PEER_PORT_TX_RX_QUORUM" Cases:"DELAY_PEER_PORT_TX_RX_ALL" Cases:"RANDOM_DELAY_PEER_PORT_TX_RX_ALL" Cases:"NO_FAIL_WITH_STRESS" Cases:"NO_FAIL_WITH_NO_STRESS_FOR_LIVENESS" FailpointCommands:"panic(\"etcd-tester\")" RunnerExecPath:"./bin/etcd-runner" Stressers:<Type:"KV_WRITE_SMALL" Weight:0.35 > Stressers:<Type:"KV_WRITE_LARGE" Weight:0.002 > Stressers:<Type:"KV_READ_ONE_KEY" Weight:0.07 > Stressers:<Type:"KV_READ_RANGE" Weight:0.07 > Stressers:<Type:"KV_DELETE_ONE_KEY" Weight:0.07 > Stressers:<Type:"KV_DELETE_RANGE" Weight:0.07 > Stressers:<Type:"KV_TXN_WRITE_DELETE" Weight:0.35 > Stressers:<Type:"LEASE" > Checkers:"KV_HASH" Checkers:"LEASE_EXPIRE" StressKeySize:100 StressKeySizeLarge:32769 StressKeySuffixRange:250000 StressKeySuffixRangeTxn:100 StressKeyTxnOps:10 StressClients:100 StressQPS:2000  cases:[] rateLimiter:<nil> stresser:<nil> checkers:[] currentRevision:0 rd:0 cs:0}
--- FAIL: Test_read (0.00s)
FAIL
FAIL	go.etcd.io/etcd/v3/functional/tester	0.050s
...

After:
go test -v ../...

...
=== RUN   Test_read
{"level":"info","ts":1596018561.408186,"caller":"tester/cluster_read_config.go:36","msg":"opened configuration file","path":"../../functional.yaml"}
{"level":"info","ts":1596018561.408739,"caller":"tester/cluster_shuffle.go:35","msg":"shuffled test failure cases","total":22}
{"level":"info","ts":1596018561.4087567,"caller":"tester/cluster_shuffle.go:35","msg":"shuffled test failure cases","total":22}
--- PASS: Test_read (0.00s)
PASS

...
2020-08-04 15:47:41 +02:00
Brandon Philips
96cce208c2 go.mod: use go.etcd.io/etcd/v3 versioning
This change makes the etcd package compatible with the existing Go
ecosystem for module versioning.

Used this tool to update package imports:
  https://github.com/KSubedi/gomove
2020-04-28 00:57:35 +00:00
lsytj0413
2c95b49b63 test(functional): remove unknown field Etcd.Debug 2019-09-19 09:51:51 +08:00
Gyuho Lee
34bd797e67 *: revert module import paths
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-05-28 15:39:35 -07:00
shivaramr
9150bf52d6 go modules: Fix module path version to include version number 2019-04-26 15:29:50 -07:00
Gyuho Lee
d37f1521b7 *: update import paths to "go.etcd.io/etcd"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 17:47:55 -07:00
Gyuho Lee
b1832d2f3c functional/tester: configurable stresser weights
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-08 16:18:45 -07:00
Gyuho Lee
a6c30eab96 functional: rename to "log-outputs"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-25 13:20:26 -07:00
Gyuho Lee
b933603a43 functional: add TODO for network isolate tests
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-19 17:44:16 -07:00
Gyuho Lee
8ee87787dd functional: use strings for LogOutput
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-17 13:03:09 -07:00
Gyuho Lee
2ee2a96055 functional/tester: use binary for tests for now
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-16 17:36:00 -07:00
Gyuho Lee
f34c5dc902 functional/tester: run tests with embedded etcd
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-16 17:36:00 -07:00
Gyuho Lee
575cf94852 functional/rpcpb: add "*Etcd.EmbedConfig", and logger fields
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-16 17:36:00 -07:00
Gyuho Lee
5ba4e7d533 functional/tester: fix unit tests
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-12 10:49:48 -07:00
Gyuho Lee
23ce3a1acc functional: rename to "listCases"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-11 19:52:23 -07:00
Gyuho Lee
e9c4bad2d1 functional/tester: add "Checker", remove compositeChecker
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-11 19:52:23 -07:00
Gyuho Lee
3815d6edb7 functional: rename "FailureCase" to "Case"
Later to add benchmark marks

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-11 19:52:23 -07:00
Gyuho Lee
ca137afe8a functional: rename to "SIGQUIT_AND_REMOVE_QUORUM_AND_RESTORE_LEADER_SNAPSHOT_FROM_SCRATCH"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-11 19:52:23 -07:00
Gyuho Lee
77824c2ed6 functional: add "SIGQUIT_AND_REMOVE_QUORUM_AND_RESTORE_SNAPSHOT_FROM_SCRATCH" to functional.yaml
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-11 19:52:23 -07:00
Gyuho Lee
f04902dbed functional: rename etcd log paths
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-11 19:52:23 -07:00
Gyuho Lee
4e7705e9e5 functional: add snapshot path to configuration
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-11 19:52:23 -07:00
Gyuho Lee
512445f089 functional: do not run "SIGQUIT_AND_REMOVE_LEADER" for now
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-11 10:24:42 -07:00
Gyuho Lee
23b8c36ced functional/tester: add "SIGQUIT_AND_REMOVE_LEADER_UNTIL_TRIGGER_SNAPSHOT"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-11 01:37:13 -07:00
Gyuho Lee
17351e5fe7 functional/tester: add "SIGQUIT_AND_REMOVE_LEADER"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-11 01:32:07 -07:00
Gyuho Lee
6a60a204ee functional/tester: add "SIGQUIT_AND_REMOVE_ONE_FOLLOWER_UNTIL_TRIGGER_SNAPSHOT"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-11 01:27:39 -07:00
Gyuho Lee
9057253d8c functional: add "SIGQUIT_AND_REMOVE_ONE_FOLLOWER"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-11 01:21:09 -07:00
Gyuho Lee
bc1fd92579 functional: rename to "SIGTERM/SIGQUIT*"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-08 23:17:53 -07:00
Gyuho Lee
85e050a120 *: rename, clean up functional tests
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-07 10:00:00 -07:00