mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
tests: Recreate cluster for every failpoint trigger
This shortens operation history and avoids having to many failed requests. Failed requests are problematic as too many of them can cause linearizability verification complexity to become exponential. Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
This commit is contained in:
parent
26c0627793
commit
11711fc007
@ -74,20 +74,22 @@ func TestLinearizability(t *testing.T) {
|
||||
},
|
||||
}
|
||||
for _, tc := range tcs {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
failpoint := FailpointConfig{
|
||||
failpoint: tc.failpoint,
|
||||
count: failpointTriggersCount,
|
||||
waitBetweenTriggers: waitBetweenFailpointTriggers,
|
||||
}
|
||||
traffic := trafficConfig{
|
||||
minimalQPS: minimalQPS,
|
||||
maximalQPS: maximalQPS,
|
||||
clientCount: 8,
|
||||
traffic: DefaultTraffic,
|
||||
}
|
||||
testLinearizability(context.Background(), t, tc.config, failpoint, traffic)
|
||||
})
|
||||
for i := 0; i < failpointTriggersCount; i++ {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
failpoint := FailpointConfig{
|
||||
failpoint: tc.failpoint,
|
||||
count: 1,
|
||||
waitBetweenTriggers: waitBetweenFailpointTriggers,
|
||||
}
|
||||
traffic := trafficConfig{
|
||||
minimalQPS: minimalQPS,
|
||||
maximalQPS: maximalQPS,
|
||||
clientCount: 8,
|
||||
traffic: DefaultTraffic,
|
||||
}
|
||||
testLinearizability(context.Background(), t, tc.config, failpoint, traffic)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user