mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #15642 from serathius/robustness-detect-trigger-timeout
tests/robustness: Detect trigger timeout and exit
This commit is contained in:
commit
9b58269298
@ -109,6 +109,12 @@ func triggerFailpoints(ctx context.Context, t *testing.T, lg *zap.Logger, clus *
|
||||
lg.Info("Triggering failpoint", zap.String("failpoint", config.failpoint.Name()))
|
||||
err = config.failpoint.Trigger(ctx, t, lg, clus)
|
||||
if err != nil {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
t.Errorf("Triggering failpoints timed out, err: %v", ctx.Err())
|
||||
return
|
||||
default:
|
||||
}
|
||||
lg.Info("Failed to trigger failpoint", zap.String("failpoint", config.failpoint.Name()), zap.Error(err))
|
||||
failures++
|
||||
continue
|
||||
|
Loading…
x
Reference in New Issue
Block a user