Skip to content

Commit

Permalink
Prevent picking a failpoint that waiting till snapshot that doesn't s…
Browse files Browse the repository at this point in the history
…upport lower snapshot catchup entries but allow reproducing issue etcd-io#15271
  • Loading branch information
serathius committed May 13, 2024
1 parent 333bd7b commit 1b16c3b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 3 additions & 0 deletions tests/robustness/failpoint/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ func (tb triggerBlackhole) Trigger(ctx context.Context, t *testing.T, member e2e
}

func (tb triggerBlackhole) Available(config e2e.EtcdProcessClusterConfig, process e2e.EtcdProcess) bool {
if tb.waitTillSnapshot && config.ServerConfig.SnapshotCatchUpEntries > 100 {
return false
}
return config.ClusterSize > 1 && process.PeerProxy() != nil
}

Expand Down
4 changes: 0 additions & 4 deletions tests/robustness/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ func testRobustness(ctx context.Context, t *testing.T, lg *zap.Logger, s testSce
t.Fatal(err)
}
}
err = failpoint.Validate(r.Cluster, s.failpoint)
if err != nil {
t.Fatal(err)
}

// t.Failed() returns false during panicking. We need to forcibly
// save data on panicking.
Expand Down

0 comments on commit 1b16c3b

Please sign in to comment.