mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Fix providing profile to robustness tests
Signed-off-by: Marek Siarkowicz <siarkowicz@google.com>
This commit is contained in:
parent
f198b417c6
commit
b4d54922eb
@ -83,6 +83,7 @@ func TestRobustness(t *testing.T) {
|
|||||||
scenarios = append(scenarios, testScenario{
|
scenarios = append(scenarios, testScenario{
|
||||||
name: name,
|
name: name,
|
||||||
traffic: tp.Traffic,
|
traffic: tp.Traffic,
|
||||||
|
profile: tp.Profile,
|
||||||
cluster: *e2e.NewConfig(clusterOfSize1Options...),
|
cluster: *e2e.NewConfig(clusterOfSize1Options...),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -98,12 +99,15 @@ func TestRobustness(t *testing.T) {
|
|||||||
scenarios = append(scenarios, testScenario{
|
scenarios = append(scenarios, testScenario{
|
||||||
name: name,
|
name: name,
|
||||||
traffic: tp.Traffic,
|
traffic: tp.Traffic,
|
||||||
|
profile: tp.Profile,
|
||||||
cluster: *e2e.NewConfig(clusterOfSize3Options...),
|
cluster: *e2e.NewConfig(clusterOfSize3Options...),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
scenarios = append(scenarios, testScenario{
|
scenarios = append(scenarios, testScenario{
|
||||||
name: "Issue14370",
|
name: "Issue14370",
|
||||||
failpoint: RaftBeforeSavePanic,
|
failpoint: RaftBeforeSavePanic,
|
||||||
|
profile: traffic.LowTraffic,
|
||||||
|
traffic: traffic.EtcdPutDeleteLease,
|
||||||
cluster: *e2e.NewConfig(
|
cluster: *e2e.NewConfig(
|
||||||
e2e.WithClusterSize(1),
|
e2e.WithClusterSize(1),
|
||||||
e2e.WithGoFailEnabled(true),
|
e2e.WithGoFailEnabled(true),
|
||||||
@ -112,6 +116,8 @@ func TestRobustness(t *testing.T) {
|
|||||||
scenarios = append(scenarios, testScenario{
|
scenarios = append(scenarios, testScenario{
|
||||||
name: "Issue14685",
|
name: "Issue14685",
|
||||||
failpoint: DefragBeforeCopyPanic,
|
failpoint: DefragBeforeCopyPanic,
|
||||||
|
profile: traffic.LowTraffic,
|
||||||
|
traffic: traffic.EtcdPutDeleteLease,
|
||||||
cluster: *e2e.NewConfig(
|
cluster: *e2e.NewConfig(
|
||||||
e2e.WithClusterSize(1),
|
e2e.WithClusterSize(1),
|
||||||
e2e.WithGoFailEnabled(true),
|
e2e.WithGoFailEnabled(true),
|
||||||
@ -131,6 +137,8 @@ func TestRobustness(t *testing.T) {
|
|||||||
watch: watchConfig{
|
watch: watchConfig{
|
||||||
requestProgress: true,
|
requestProgress: true,
|
||||||
},
|
},
|
||||||
|
profile: traffic.LowTraffic,
|
||||||
|
traffic: traffic.EtcdPutDeleteLease,
|
||||||
cluster: *e2e.NewConfig(
|
cluster: *e2e.NewConfig(
|
||||||
e2e.WithClusterSize(1),
|
e2e.WithClusterSize(1),
|
||||||
),
|
),
|
||||||
@ -151,13 +159,6 @@ func TestRobustness(t *testing.T) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
for _, scenario := range scenarios {
|
for _, scenario := range scenarios {
|
||||||
if scenario.traffic == nil {
|
|
||||||
scenario.traffic = traffic.EtcdPutDeleteLease
|
|
||||||
}
|
|
||||||
if scenario.profile == (traffic.Profile{}) {
|
|
||||||
scenario.profile = traffic.LowTraffic
|
|
||||||
}
|
|
||||||
|
|
||||||
t.Run(scenario.name, func(t *testing.T) {
|
t.Run(scenario.name, func(t *testing.T) {
|
||||||
lg := zaptest.NewLogger(t)
|
lg := zaptest.NewLogger(t)
|
||||||
scenario.cluster.Logger = lg
|
scenario.cluster.Logger = lg
|
||||||
|
Loading…
x
Reference in New Issue
Block a user