Skip to content

Commit a330402

Browse files
committed
fix-logging-error
1 parent 4c0ea9d commit a330402

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pkg/envtest/server.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,16 @@ func (te *Environment) Start() (*rest.Config, error) {
172172

173173
func (te *Environment) startControlPlane() error {
174174
numTries, maxRetries := 0, 5
175+
var err error
175176
for ; numTries < maxRetries; numTries++ {
176177
// Start the control plane - retry if it fails
177-
err := te.ControlPlane.Start()
178+
err = te.ControlPlane.Start()
178179
if err == nil {
179180
break
180181
}
181182
}
182183
if numTries == maxRetries {
183-
return fmt.Errorf("failed to start the controlplane. retried %d times", numTries)
184+
return fmt.Errorf("failed to start the controlplane. retried %d times: %s", numTries, err.Error())
184185
}
185186
return nil
186187
}

0 commit comments

Comments
 (0)