Skip to content

Commit

Permalink
tests: Add reproduce etcd-io#13766 scenario
Browse files Browse the repository at this point in the history
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
  • Loading branch information
serathius committed Jan 16, 2023
1 parent 677e528 commit 245d03f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/linearizability-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ jobs:
uses: ./.github/workflows/linearizability-template.yaml
with:
ref: main
count: 300
count: 200
timeoutDuration: 170m
test-35:
uses: ./.github/workflows/linearizability-template.yaml
with:
ref: release-3.5
count: 300
count: 200
timeoutDuration: 170m
test-34:
uses: ./.github/workflows/linearizability-template.yaml
with:
ref: release-3.4
count: 300
count: 200
timeoutDuration: 170m
2 changes: 1 addition & 1 deletion .github/workflows/linearizability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ jobs:
uses: ./.github/workflows/linearizability-template.yaml
with:
ref: ${{ github.ref }}
count: 60
count: 40
testTimeout: 30m
15 changes: 12 additions & 3 deletions tests/linearizability/linearizability_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ import (

const (
// minimalQPS is used to validate if enough traffic is send to make tests accurate.
minimalQPS = 100.0
minimalQPS = 200.0
// maximalQPS limits number of requests send to etcd to avoid linearizability analysis taking too long.
maximalQPS = 200.0
maximalQPS = 1000.0
// waitBetweenFailpointTriggers
waitBetweenFailpointTriggers = time.Second
)
Expand All @@ -54,6 +54,7 @@ func TestLinearizability(t *testing.T) {
failpoint: RandomFailpoint,
config: *e2e.NewConfig(
e2e.WithClusterSize(1),
e2e.WithSnapshotCount(100),
e2e.WithPeerProxy(true),
e2e.WithGoFailEnabled(true),
e2e.WithCompactionBatchLimit(100), // required for compactBeforeCommitBatch and compactAfterCommitBatch failpoints
Expand All @@ -63,6 +64,7 @@ func TestLinearizability(t *testing.T) {
name: "ClusterOfSize3",
failpoint: RandomFailpoint,
config: *e2e.NewConfig(
e2e.WithSnapshotCount(100),
e2e.WithPeerProxy(true),
e2e.WithGoFailEnabled(true),
e2e.WithCompactionBatchLimit(100), // required for compactBeforeCommitBatch and compactAfterCommitBatch failpoints
Expand All @@ -84,6 +86,13 @@ func TestLinearizability(t *testing.T) {
e2e.WithGoFailEnabled(true),
),
},
{
name: "Issue13766",
failpoint: KillFailpoint,
config: *e2e.NewConfig(
e2e.WithSnapshotCount(100),
),
},
}
for _, tc := range tcs {
t.Run(tc.name, func(t *testing.T) {
Expand All @@ -101,7 +110,7 @@ func TestLinearizability(t *testing.T) {
}, trafficConfig{
minimalQPS: minimalQPS,
maximalQPS: maximalQPS,
clientCount: 8,
clientCount: 12,
traffic: DefaultTraffic,
})
longestHistory, remainingEvents := pickLongestHistory(events)
Expand Down

0 comments on commit 245d03f

Please sign in to comment.