From 6a60a204ee5b802457b74ad74c4bbb63f183d60b Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Wed, 11 Apr 2018 01:27:39 -0700 Subject: [PATCH] functional/tester: add "SIGQUIT_AND_REMOVE_ONE_FOLLOWER_UNTIL_TRIGGER_SNAPSHOT" Signed-off-by: Gyuho Lee --- functional.yaml | 1 + functional/tester/cluster.go | 3 +++ functional/tester/cluster_test.go | 1 + functional/tester/failure_case_sigquit_remove.go | 7 +++++++ 4 files changed, 12 insertions(+) diff --git a/functional.yaml b/functional.yaml index ef9fcdc24..f146a510f 100644 --- a/functional.yaml +++ b/functional.yaml @@ -129,6 +129,7 @@ tester-config: - SIGTERM_QUORUM - SIGTERM_ALL - SIGQUIT_AND_REMOVE_ONE_FOLLOWER + - SIGQUIT_AND_REMOVE_ONE_FOLLOWER_UNTIL_TRIGGER_SNAPSHOT - BLACKHOLE_PEER_PORT_TX_RX_ONE_FOLLOWER - BLACKHOLE_PEER_PORT_TX_RX_ONE_FOLLOWER_UNTIL_TRIGGER_SNAPSHOT - BLACKHOLE_PEER_PORT_TX_RX_LEADER diff --git a/functional/tester/cluster.go b/functional/tester/cluster.go index 73fd4e6c5..68027d803 100644 --- a/functional/tester/cluster.go +++ b/functional/tester/cluster.go @@ -164,6 +164,9 @@ func (clus *Cluster) updateFailures() { case "SIGQUIT_AND_REMOVE_ONE_FOLLOWER": clus.failures = append(clus.failures, new_FailureCase_SIGQUIT_AND_REMOVE_ONE_FOLLOWER(clus)) + case "SIGQUIT_AND_REMOVE_ONE_FOLLOWER_UNTIL_TRIGGER_SNAPSHOT": + clus.failures = append(clus.failures, + new_FailureCase_SIGQUIT_AND_REMOVE_ONE_FOLLOWER_UNTIL_TRIGGER_SNAPSHOT(clus)) case "BLACKHOLE_PEER_PORT_TX_RX_ONE_FOLLOWER": clus.failures = append(clus.failures, diff --git a/functional/tester/cluster_test.go b/functional/tester/cluster_test.go index 75e6a2df0..c6bac50a0 100644 --- a/functional/tester/cluster_test.go +++ b/functional/tester/cluster_test.go @@ -163,6 +163,7 @@ func Test_read(t *testing.T) { "SIGTERM_QUORUM", "SIGTERM_ALL", "SIGQUIT_AND_REMOVE_ONE_FOLLOWER", + "SIGQUIT_AND_REMOVE_ONE_FOLLOWER_UNTIL_TRIGGER_SNAPSHOT", "BLACKHOLE_PEER_PORT_TX_RX_ONE_FOLLOWER", "BLACKHOLE_PEER_PORT_TX_RX_ONE_FOLLOWER_UNTIL_TRIGGER_SNAPSHOT", "BLACKHOLE_PEER_PORT_TX_RX_LEADER", diff --git a/functional/tester/failure_case_sigquit_remove.go b/functional/tester/failure_case_sigquit_remove.go index e3080e56f..2f720dedc 100644 --- a/functional/tester/failure_case_sigquit_remove.go +++ b/functional/tester/failure_case_sigquit_remove.go @@ -167,6 +167,13 @@ func new_FailureCase_SIGQUIT_AND_REMOVE_ONE_FOLLOWER(clus *Cluster) Failure { } } +func new_FailureCase_SIGQUIT_AND_REMOVE_ONE_FOLLOWER_UNTIL_TRIGGER_SNAPSHOT(clus *Cluster) Failure { + return &failureUntilSnapshot{ + failureCase: rpcpb.FailureCase_SIGQUIT_AND_REMOVE_ONE_FOLLOWER_UNTIL_TRIGGER_SNAPSHOT, + Failure: new_FailureCase_SIGQUIT_AND_REMOVE_ONE_FOLLOWER(clus), + } +} + func describeMembers(mresp *clientv3.MemberListResponse) (ss []string) { ss = make([]string, len(mresp.Members)) for i, m := range mresp.Members {