Skip to content

Commit 29b9aa6

Browse files
committed
Implement robustness test target for 20221
Reference: - #20221 Signed-off-by: Chun-Hung Tseng <[email protected]>
1 parent 14ddb3f commit 29b9aa6

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

tests/robustness/Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,11 @@ test-robustness-issue20573: /tmp/etcd-v3.6.4-failpoints/bin
8080
GO_TEST_FLAGS='-v -run=TestRobustnessRegression/issue20573 -count 200 -failfast --bin-dir=/tmp/etcd-v3.6.4-failpoints/bin' $(TOPLEVEL_MAKE) test-robustness && \
8181
echo "Failed to reproduce" || echo "Successful reproduction"
8282

83+
.PHONY: test-robustness-issue20221
84+
test-robustness-issue20221: /tmp/etcd-866bc0717c0b56579514c7363f3f47f6cd4109c6-failpoints/bin
85+
GO_TEST_FLAGS='-v -run=TestRobustnessRegression/issue20221 -count 200 -failfast --bin-dir=/tmp/etcd-866bc0717c0b56579514c7363f3f47f6cd4109c6-failpoints/bin' $(TOPLEVEL_MAKE) test-robustness && \
86+
echo "Failed to reproduce" || echo "Successful reproduction"
87+
8388
# Etcd API usage by Kubernetes
8489

8590
.PHONY: k8s-coverage
@@ -125,6 +130,14 @@ $(GOPATH)/bin/gofail: $(REPOSITORY_ROOT)/tools/mod/go.mod $(REPOSITORY_ROOT)/too
125130
$(MAKE) gofail-enable; \
126131
$(MAKE) build;
127132

133+
/tmp/etcd-866bc0717c0b56579514c7363f3f47f6cd4109c6-failpoints/bin: $(GOPATH)/bin/gofail
134+
rm -rf /tmp/etcd-866bc0717c0b56579514c7363f3f47f6cd4109c6-failpoints/
135+
mkdir -p /tmp/etcd-866bc0717c0b56579514c7363f3f47f6cd4109c6-failpoints/
136+
cd /tmp/etcd-866bc0717c0b56579514c7363f3f47f6cd4109c6-failpoints/; \
137+
git clone --depth 1 --revision 866bc0717c0b56579514c7363f3f47f6cd4109c6 https://github.com/etcd-io/etcd.git .; \
138+
$(MAKE) gofail-enable; \
139+
$(MAKE) build;
140+
128141
/tmp/etcd-release-3.6-failpoints/bin: $(GOPATH)/bin/gofail
129142
rm -rf /tmp/etcd-release-3.6-failpoints/
130143
mkdir -p /tmp/etcd-release-3.6-failpoints/

tests/robustness/scenarios/scenarios.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,5 +308,24 @@ func Regression(t *testing.T) []TestScenario {
308308
),
309309
})
310310

311+
scenarios = append(scenarios, TestScenario{
312+
Name: "issue20221",
313+
Profile: traffic.HighTrafficProfile.WithoutCompaction().WithContinuousWatchCreationInterval(10 * time.Millisecond).WithContinuousWatchCreationRevisionOffset(100),
314+
Failpoint: failpoint.RaftAfterSaveSnapPanic,
315+
// Failpoint: failpoint.RaftBeforeApplySnapPanic,
316+
// Failpoint: failpoint.RaftAfterApplySnapPanic,
317+
// Failpoint: failpoint.RaftAfterWALReleasePanic,
318+
Traffic: traffic.Kubernetes,
319+
Cluster: *e2e.NewConfig(
320+
e2e.WithClusterSize(3),
321+
e2e.WithCompactionBatchLimit(10),
322+
e2e.WithSnapshotCount(50),
323+
e2e.WithSnapshotCatchUpEntries(100),
324+
e2e.WithGoFailEnabled(true),
325+
e2e.WithPeerProxy(true),
326+
e2e.WithIsPeerTLS(true),
327+
),
328+
})
329+
311330
return scenarios
312331
}

0 commit comments

Comments
 (0)