Skip to content

Commit adb5c97

Browse files
committed
Implement robustness test target for 20693
Reference: - #20693 Signed-off-by: Chun-Hung Tseng <[email protected]>
1 parent 985e056 commit adb5c97

File tree

2 files changed

+31
-15
lines changed

2 files changed

+31
-15
lines changed

tests/robustness/Makefile

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ test-robustness-issue19179: /tmp/etcd-v3.5.17-failpoints/bin
7575
GO_TEST_FLAGS='-v -run=TestRobustnessRegression/Issue19179 -count 200 -failfast --bin-dir=/tmp/etcd-v3.5.17-failpoints/bin' $(TOPLEVEL_MAKE) test-robustness && \
7676
echo "Failed to reproduce" || echo "Successful reproduction"
7777

78+
.PHONY: test-robustness-issue20693
79+
test-robustness-issue20693: /tmp/etcd-v3.6.4-failpoints/bin
80+
GO_TEST_FLAGS='-v -run=TestRobustnessRegression/issue20693 -count 2500 -failfast --bin-dir=/tmp/etcd-v3.6.4-failpoints/bin' $(TOPLEVEL_MAKE) TIMEOUT=24h test-robustness && \
81+
echo "Failed to reproduce" || echo "Successful reproduction"
82+
7883
# Etcd API usage by Kubernetes
7984

8085
.PHONY: k8s-coverage
@@ -120,21 +125,12 @@ $(GOPATH)/bin/gofail: $(REPOSITORY_ROOT)/tools/mod/go.mod $(REPOSITORY_ROOT)/too
120125
$(MAKE) gofail-enable; \
121126
$(MAKE) build;
122127

123-
/tmp/etcd-v3.6.0-failpoints/bin: $(GOPATH)/bin/gofail
124-
rm -rf /tmp/etcd-v3.6.0-failpoints/
125-
mkdir -p /tmp/etcd-v3.6.0-failpoints/
126-
cd /tmp/etcd-v3.6.0-failpoints/; \
127-
git clone --depth 1 --branch main https://github.com/etcd-io/etcd.git .; \
128-
$(MAKE) gofail-enable; \
129-
$(MAKE) build;
130-
131-
/tmp/etcd-release-3.6-failpoints/bin: $(GOPATH)/bin/gofail
132-
rm -rf /tmp/etcd-release-3.6-failpoints/
133-
mkdir -p /tmp/etcd-release-3.6-failpoints/
134-
cd /tmp/etcd-release-3.6-failpoints/; \
135-
git clone --depth 1 --branch release-3.6 https://github.com/etcd-io/etcd.git .; \
136-
$(MAKE) gofail-enable; \
137-
$(MAKE) build;
128+
/tmp/etcd-v3.6.%-failpoints/bin: $(GOPATH)/bin/gofail
129+
rm -rf /tmp/etcd-v3.6.%-failpoints/
130+
mkdir -p /tmp/etcd-v3.6.%-failpoints/
131+
cd /tmp/etcd-v3.6.%-failpoints/; \
132+
git clone --depth 1 --branch v3.6.% https://github.com/etcd-io/etcd.git .; \
133+
FAILPOINTS=true ./build;
138134

139135
/tmp/etcd-v3.5.2-failpoints/bin:
140136
/tmp/etcd-v3.5.4-failpoints/bin:

tests/robustness/scenarios/scenarios.go

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ func Regression(t *testing.T) []TestScenario {
261261
e2e.WithGoFailEnabled(true),
262262
),
263263
})
264+
264265
scenarios = append(scenarios, TestScenario{
265266
Name: "Issue18089",
266267
Profile: traffic.LowTraffic.WithCompactionPeriod(100 * time.Millisecond), // Use frequent compaction for high reproduce rate
@@ -271,6 +272,7 @@ func Regression(t *testing.T) []TestScenario {
271272
e2e.WithGoFailEnabled(true),
272273
),
273274
})
275+
274276
if v.Compare(version.V3_5) >= 0 {
275277
opts := []e2e.EPClusterOption{
276278
e2e.WithSnapshotCount(100),
@@ -280,6 +282,7 @@ func Regression(t *testing.T) []TestScenario {
280282
if e2e.CouldSetSnapshotCatchupEntries(e2e.BinPath.Etcd) {
281283
opts = append(opts, e2e.WithSnapshotCatchUpEntries(100))
282284
}
285+
283286
scenarios = append(scenarios, TestScenario{
284287
Name: "Issue15271",
285288
Failpoint: failpoint.BlackholeUntilSnapshot,
@@ -288,5 +291,22 @@ func Regression(t *testing.T) []TestScenario {
288291
Cluster: *e2e.NewConfig(opts...),
289292
})
290293
}
294+
295+
scenarios = append(scenarios, TestScenario{
296+
Name: "issue20693",
297+
Profile: traffic.HighTrafficProfile.WithoutCompaction().WithBackgroundWatchConfigInterval(10 * time.Millisecond).WithBackgroundWatchConfigRevisionOffset(-10),
298+
Failpoint: failpoint.RaftAfterSaveSnapPanic,
299+
Traffic: traffic.Kubernetes,
300+
Cluster: *e2e.NewConfig(
301+
e2e.WithClusterSize(3),
302+
e2e.WithCompactionBatchLimit(10),
303+
e2e.WithSnapshotCount(50),
304+
e2e.WithSnapshotCatchUpEntries(100),
305+
e2e.WithGoFailEnabled(true),
306+
e2e.WithPeerProxy(true),
307+
e2e.WithIsPeerTLS(true),
308+
),
309+
})
310+
291311
return scenarios
292312
}

0 commit comments

Comments
 (0)