Commit 89898f8
committed
UPSTREAM: <138159>: Tests: Call removeNodeTaint variadically instead of in a loop
I believe there is a sneaky timing/caching issue here. When RemoveTaintsOffNode removes taints one at a time in a loop, each iteration reads the node from the API server cache, removes one taint, and patches. If the cache is stale for any iteration (still reflecting the state before the previous patch's watch event propagated) the patch sends the full stale list minus only the current taint, effectively re-adding the taint that was just removed in the prior step. Since the loop has already moved past that taint, it's never cleaned up. verifyThatTaintIsGone (previously called once per loop) doesn't catch this because it only checks whether the current taint was removed, not whether previously removed taints were re-introduced. The fix is to remove all taints in a single cycle instead of looping, which removeNodeTaint's variadic signature already supports.1 parent 9193b12 commit 89898f8
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
601 | 607 | | |
602 | | - | |
| 608 | + | |
603 | 609 | | |
604 | 610 | | |
605 | 611 | | |
| |||
0 commit comments