Skip to content

Commit

Permalink
Merge pull request etcd-io#16711 from serathius/robustness-fix-profile
Browse files Browse the repository at this point in the history
Fix providing profile to robustness tests
  • Loading branch information
serathius authored Oct 9, 2023
2 parents 01a0d8b + b4d5492 commit de39c75
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions tests/robustness/linearizability_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ func TestRobustness(t *testing.T) {
scenarios = append(scenarios, testScenario{
name: name,
traffic: tp.Traffic,
profile: tp.Profile,
cluster: *e2e.NewConfig(clusterOfSize1Options...),
})
}
Expand All @@ -98,12 +99,15 @@ func TestRobustness(t *testing.T) {
scenarios = append(scenarios, testScenario{
name: name,
traffic: tp.Traffic,
profile: tp.Profile,
cluster: *e2e.NewConfig(clusterOfSize3Options...),
})
}
scenarios = append(scenarios, testScenario{
name: "Issue14370",
failpoint: RaftBeforeSavePanic,
profile: traffic.LowTraffic,
traffic: traffic.EtcdPutDeleteLease,
cluster: *e2e.NewConfig(
e2e.WithClusterSize(1),
e2e.WithGoFailEnabled(true),
Expand All @@ -112,6 +116,8 @@ func TestRobustness(t *testing.T) {
scenarios = append(scenarios, testScenario{
name: "Issue14685",
failpoint: DefragBeforeCopyPanic,
profile: traffic.LowTraffic,
traffic: traffic.EtcdPutDeleteLease,
cluster: *e2e.NewConfig(
e2e.WithClusterSize(1),
e2e.WithGoFailEnabled(true),
Expand All @@ -131,6 +137,8 @@ func TestRobustness(t *testing.T) {
watch: watchConfig{
requestProgress: true,
},
profile: traffic.LowTraffic,
traffic: traffic.EtcdPutDeleteLease,
cluster: *e2e.NewConfig(
e2e.WithClusterSize(1),
),
Expand All @@ -151,13 +159,6 @@ func TestRobustness(t *testing.T) {
})
}
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) {
lg := zaptest.NewLogger(t)
scenario.cluster.Logger = lg
Expand Down

0 comments on commit de39c75

Please sign in to comment.