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.
@@ -74,10 +74,11 @@ func TestLinearizability(t *testing.T) {
},
}
for _, tc := range tcs {
+ for i := 0; i < failpointTriggersCount; i++ {
t.Run(tc.name, func(t *testing.T) {
failpoint := FailpointConfig{
failpoint: tc.failpoint,
- count: failpointTriggersCount,
+ count: 1,
waitBetweenTriggers: waitBetweenFailpointTriggers,
}
traffic := trafficConfig{
@@ -90,6 +91,7 @@ func TestLinearizability(t *testing.T) {
})
}
}
+}
func testLinearizability(ctx context.Context, t *testing.T, config e2e.EtcdProcessClusterConfig, failpoint FailpointConfig, traffic trafficConfig) {
clus, err := e2e.NewEtcdProcessCluster(ctx, t, e2e.WithConfig(&config))
