@@ -380,12 +380,12 @@ func (config *NetworkingTestConfig) GetHTTPCodeFromTestContainer(path, targetIP
380
380
return code , nil
381
381
}
382
382
383
- // DialFromNode executes a tcp or udp curl/echo request based on protocol via kubectl exec
383
+ // DialFromNode executes a tcp/ udp curl/nc request based on protocol via kubectl exec
384
384
// in a test container running with host networking.
385
- // - minTries is the minimum number of curl/echo attempts required before declaring
385
+ // - minTries is the minimum number of curl/nc attempts required before declaring
386
386
// success. If 0, then we return as soon as all endpoints succeed.
387
387
// - There is no logical change to test results if faillures happen AFTER endpoints have succeeded,
388
- // hence over-padding minTries will NOT reverse a successfull result and is thus not very useful yet
388
+ // hence over-padding minTries will NOT reverse a successful result and is thus not very useful yet
389
389
// (See the TODO about checking probability, which isnt implemented yet).
390
390
// - maxTries is the maximum number of curl/echo attempts before an error is returned. The
391
391
// smaller this number is, the less 'slack' there is for declaring success.
@@ -411,6 +411,7 @@ func (config *NetworkingTestConfig) DialFromNode(protocol, targetIP string, targ
411
411
eps := sets .NewString ()
412
412
413
413
filterCmd := fmt .Sprintf ("%s | grep -v '^\\ s*$'" , cmd )
414
+ framework .Logf ("Going to poll %v on port %v at least %v times, with a maximum of %v tries before failing" , targetIP , targetPort , minTries , maxTries )
414
415
for i := 0 ; i < maxTries ; i ++ {
415
416
stdout , stderr , err := config .f .ExecShellInPodWithFullOutput (config .HostTestContainerPod .Name , filterCmd )
416
417
if err != nil || len (stderr ) > 0 {
@@ -427,7 +428,7 @@ func (config *NetworkingTestConfig) DialFromNode(protocol, targetIP string, targ
427
428
428
429
// Check against i+1 so we exit if minTries == maxTries.
429
430
if eps .Equal (expectedEps ) && i + 1 >= minTries {
430
- framework .Logf ("Found all %+v expected endpoints: %+v" , len ( eps .List () ), eps .List ())
431
+ framework .Logf ("Found all %d expected endpoints: %+v" , eps .Len ( ), eps .List ())
431
432
return nil
432
433
}
433
434
@@ -438,7 +439,7 @@ func (config *NetworkingTestConfig) DialFromNode(protocol, targetIP string, targ
438
439
}
439
440
440
441
config .diagnoseMissingEndpoints (eps )
441
- return fmt .Errorf ("failed to find expected endpoints: \n Tries %d\n Command %v\n retrieved %v\n expected %v\n " , maxTries , cmd , eps , expectedEps )
442
+ return fmt .Errorf ("failed to find expected endpoints, \n tries %d\n Command %v\n retrieved %v\n expected %v" , maxTries , cmd , eps , expectedEps )
442
443
}
443
444
444
445
// GetSelfURL executes a curl against the given path via kubectl exec into a
0 commit comments