mirror of
https://github.com/kubernetes/kubectl.git
synced 2026-05-28 04:35:50 -04:00
kubectl/drain: widen namespace termination retry timeout
TestEvictDuringNamespaceTerminating intentionally exercises the retry path but only allows 10ms of total time. The production loop sleeps, refreshes state, and retries under that same deadline, so a single retry plus scheduler jitter is enough to exhaust the budget under -race or on busy CI workers. Keep the retry interval small so the test still covers the retry behavior, but widen the overall timeout so the assertion measures semantics instead of machine speed. Tested: go test -race ./staging/src/k8s.io/kubectl/pkg/drain -run TestEvictDuringNamespaceTerminating -count=100 Kubernetes-commit: 77f8d7c2a9571dd9a76ee1be8b234a4dddd2ad35
This commit is contained in:
parent
3b3daf56ef
commit
e67d906fc9
1 changed files with 3 additions and 1 deletions
|
|
@ -536,7 +536,9 @@ func TestEvictDuringNamespaceTerminating(t *testing.T) {
|
|||
testNamespace := "default"
|
||||
|
||||
retryDelay := 5 * time.Millisecond
|
||||
globalTimeout := 2 * retryDelay
|
||||
// Give the helper enough room for a retry plus scheduler jitter on loaded CI
|
||||
// hosts. A 10ms total timeout is too small under -race.
|
||||
globalTimeout := 20 * retryDelay
|
||||
|
||||
tests := []struct {
|
||||
description string
|
||||
|
|
|
|||
Loading…
Reference in a new issue