mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 15:25:57 +00:00
Merge pull request #126888 from aroradaman/proxy-nfacct-e2e-fix
e2e/network/proxy: fix e2e assertions
This commit is contained in:
commit
3a620a3f5e
@ -361,12 +361,19 @@ var _ = common.SIGDescribe("KubeProxy", func() {
|
|||||||
// our target metric should be updated by now
|
// our target metric should be updated by now
|
||||||
if err := wait.PollUntilContextTimeout(ctx, 10*time.Second, 2*time.Minute, true, func(_ context.Context) (bool, error) {
|
if err := wait.PollUntilContextTimeout(ctx, 10*time.Second, 2*time.Minute, true, func(_ context.Context) (bool, error) {
|
||||||
metrics, err := metricsGrabber.GrabFromKubeProxy(ctx, nodeName)
|
metrics, err := metricsGrabber.GrabFromKubeProxy(ctx, nodeName)
|
||||||
framework.ExpectNoError(err)
|
if err != nil {
|
||||||
|
return false, fmt.Errorf("failed to fetch metrics: %w", err)
|
||||||
|
}
|
||||||
targetMetricAfter, err := metrics.GetCounterMetricValue(metricName)
|
targetMetricAfter, err := metrics.GetCounterMetricValue(metricName)
|
||||||
framework.ExpectNoError(err)
|
if err != nil {
|
||||||
|
return false, fmt.Errorf("failed to fetch metric: %w", err)
|
||||||
|
}
|
||||||
return targetMetricAfter > targetMetricBefore, nil
|
return targetMetricAfter > targetMetricBefore, nil
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
framework.Failf("expected %s metric to be updated after accessing endpoints via localhost nodeports", metricName)
|
if wait.Interrupted(err) {
|
||||||
|
framework.Failf("expected %s metric to be updated after accessing endpoints via localhost nodeports", metricName)
|
||||||
|
}
|
||||||
|
framework.ExpectNoError(err)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user