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 7daec29 commit bb36751
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linearizability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
make build
mkdir -p /tmp/linearizability
cat server/etcdserver/raft.fail.go
EXPECT_DEBUG=true GO_TEST_FLAGS='-v --count 60 --failfast --run TestLinearizability' RESULTS_DIR=/tmp/linearizability make test-linearizability
EXPECT_DEBUG=true GO_TEST_FLAGS='-v --count 40 --failfast --run TestLinearizability' RESULTS_DIR=/tmp/linearizability make test-linearizability
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
if: always()
with:
Expand Down
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 bb36751

Please sign in to comment.