(ctx context.Context, _ PlanStepWaitForFaultCompletion)
| 110 | } |
| 111 | |
| 112 | func (te *TestExecutor) runWaitForFaultCompletion(ctx context.Context, _ PlanStepWaitForFaultCompletion) error { |
| 113 | |
| 114 | for i, fs := range te.faultSessions { |
| 115 | now := time.Now() |
| 116 | if now.Before(*fs.TestEndTime) { |
| 117 | waitTime := fs.TestEndTime.Sub(now) |
| 118 | log.Infof("Waiting %.0f seconds for fault #%d to terminate", waitTime.Seconds(), i+1) |
| 119 | log.Infof( |
| 120 | "Est time of fault completion: %d:%d:%d %s", |
| 121 | fs.TestEndTime.Hour(), |
| 122 | fs.TestEndTime.Minute(), |
| 123 | fs.TestEndTime.Second(), |
| 124 | fs.TestEndTime.Location().String()) |
| 125 | time.Sleep(waitTime) |
| 126 | } |
| 127 | err := waitForFaultRecovery(ctx, fs) |
| 128 | if err != nil { |
| 129 | return err |
| 130 | } |
| 131 | log.Infof("Fault #%d has completed", i+1) |
| 132 | } |
| 133 | return nil |
| 134 | } |
| 135 | |
| 136 | func (te *TestExecutor) runWaitForDuration(step PlanStepWait) error { |
| 137 | log.Infof("Sleeping for %.0f seconds", step.WaitAmount.Seconds()) |
no test coverage detected