@@ -189,29 +189,29 @@ func WaitUntilStarterExit(t *testing.T, timeout time.Duration, exitCode int, sta
189
189
190
190
// WaitUntilStarterReady waits until all given starter processes have reached the "Your cluster is ready state"
191
191
func WaitUntilStarterReady (t * testing.T , what string , requiredGoodResults int , starters ... * SubProcess ) bool {
192
- results := make ([]error , len (starters ))
192
+ errors := make ([]error , len (starters ))
193
193
194
194
ctx , cancel := context .WithCancel (context .Background ())
195
195
defer cancel ()
196
196
197
197
var wg sync.WaitGroup
198
198
199
- wg .Add (len (results ))
199
+ wg .Add (len (errors ))
200
200
201
201
for id , starter := range starters {
202
202
go func (i int , s * SubProcess ) {
203
203
defer wg .Done ()
204
- defer cancel ()
204
+
205
205
id := fmt .Sprintf ("starter-%d" , i + 1 )
206
206
207
- results [i ] = s .ExpectTimeout (ctx , time .Minute * 3 , regexp .MustCompile (fmt .Sprintf ("Your %s can now be accessed with a browser at" , what )), id )
207
+ errors [i ] = s .ExpectTimeout (ctx , time .Minute * 1 , regexp .MustCompile (fmt .Sprintf ("Your %s can now be accessed with a browser at" , what )), id )
208
208
}(id , starter )
209
209
}
210
210
211
211
wg .Wait ()
212
212
213
213
failed := 0
214
- for _ , result := range results {
214
+ for _ , result := range errors {
215
215
if result != nil {
216
216
failed ++
217
217
}
@@ -229,7 +229,7 @@ func WaitUntilStarterReady(t *testing.T, what string, requiredGoodResults int, s
229
229
time .Sleep (time .Hour )
230
230
}
231
231
}
232
- for _ , msg := range results {
232
+ for _ , msg := range errors {
233
233
t .Error (msg )
234
234
}
235
235
0 commit comments