From 36f07cb591cf5f6defb4bde51abdc5e6b7a28f33 Mon Sep 17 00:00:00 2001 From: Piotr Tabor Date: Mon, 13 Jul 2020 20:00:30 +0200 Subject: [PATCH] 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: agentConns:[] agentClients:[] agentStreams:[] agentRequests:[] testerHTTPServer: 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: 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: 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: 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: Stressers: Stressers: Stressers: Stressers: Stressers: Stressers: Stressers: Checkers:"KV_HASH" Checkers:"LEASE_EXPIRE" StressKeySize:100 StressKeySizeLarge:32769 StressKeySuffixRange:250000 StressKeySuffixRangeTxn:100 StressKeyTxnOps:10 StressClients:100 StressQPS:2000 cases:[] rateLimiter: stresser: checkers:[] currentRevision:0 rd:0 cs:0}, got &{lg: agentConns:[] agentClients:[] agentStreams:[] agentRequests:[] testerHTTPServer: 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: 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: 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: 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: Stressers: Stressers: Stressers: Stressers: Stressers: Stressers: Stressers: Checkers:"KV_HASH" Checkers:"LEASE_EXPIRE" StressKeySize:100 StressKeySizeLarge:32769 StressKeySuffixRange:250000 StressKeySuffixRangeTxn:100 StressKeyTxnOps:10 StressClients:100 StressQPS:2000 cases:[] rateLimiter: stresser: 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 ... --- functional/tester/cluster_test.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/functional/tester/cluster_test.go b/functional/tester/cluster_test.go index c11c8ba20..93db53e13 100644 --- a/functional/tester/cluster_test.go +++ b/functional/tester/cluster_test.go @@ -58,12 +58,13 @@ func Test_read(t *testing.T) { 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, + SnapshotCount: 2000, QuotaBackendBytes: 10740000000, PreVote: true, InitialCorruptCheck: true, Logger: "zap", LogOutputs: []string{"/tmp/etcd-functional-1/etcd.log"}, + LogLevel: "info", }, ClientCertData: "", ClientCertPath: "", @@ -110,12 +111,13 @@ func Test_read(t *testing.T) { 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, + SnapshotCount: 2000, QuotaBackendBytes: 10740000000, PreVote: true, InitialCorruptCheck: true, Logger: "zap", LogOutputs: []string{"/tmp/etcd-functional-2/etcd.log"}, + LogLevel: "info", }, ClientCertData: "", ClientCertPath: "", @@ -162,12 +164,13 @@ func Test_read(t *testing.T) { 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, + SnapshotCount: 2000, QuotaBackendBytes: 10740000000, PreVote: true, InitialCorruptCheck: true, Logger: "zap", LogOutputs: []string{"/tmp/etcd-functional-3/etcd.log"}, + LogLevel: "info", }, ClientCertData: "", ClientCertPath: "", @@ -266,7 +269,9 @@ func Test_read(t *testing.T) { cfg.lg = nil if !reflect.DeepEqual(exp, cfg) { - t.Fatalf("expected %+v, got %+v", exp, cfg) + t.Fatalf(`exp != cfg: + expected %+v + got %+v`, exp, cfg) } cfg.lg = logger