mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
mock tests: do not give up immediately for pod output errors
As seen in some test runs (https://prow.k8s.io/view/gcs/kubernetes-jenkins/pr-logs/pull/89041), retrieving output can fail with "the server rejected our request for an unknown reason (get pods csi-mockplugin-0)". If this truly an intermittent error, then the existing retry logic in the callers can deal with this.
This commit is contained in:
parent
e23a26a380
commit
981aae35dd
@ -974,10 +974,14 @@ func parseMockLogs(cs clientset.Interface, namespace, driverPodName, driverConta
|
|||||||
// yet or error when calls do not match.
|
// yet or error when calls do not match.
|
||||||
// All repeated calls to the CSI mock driver (e.g. due to exponential backoff)
|
// All repeated calls to the CSI mock driver (e.g. due to exponential backoff)
|
||||||
// are squashed and checked against single expectedCallSequence item.
|
// are squashed and checked against single expectedCallSequence item.
|
||||||
|
//
|
||||||
|
// Only permanent errors are returned. Other errors are logged and no
|
||||||
|
// calls are returned. The caller is expected to retry.
|
||||||
func compareCSICalls(trackedCalls []string, expectedCallSequence []csiCall, cs clientset.Interface, namespace, driverPodName, driverContainerName string) (int, error) {
|
func compareCSICalls(trackedCalls []string, expectedCallSequence []csiCall, cs clientset.Interface, namespace, driverPodName, driverContainerName string) (int, error) {
|
||||||
allCalls, err := parseMockLogs(cs, namespace, driverPodName, driverContainerName)
|
allCalls, err := parseMockLogs(cs, namespace, driverPodName, driverContainerName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
framework.Logf("intermittent (?) log retrieval error, proceeding without output: %v", err)
|
||||||
|
return 0, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove all repeated and ignored calls
|
// Remove all repeated and ignored calls
|
||||||
|
Loading…
Reference in New Issue
Block a user