mirror of
https://github.com/kubernetes/sample-controller.git
synced 2026-02-15 00:07:52 +08:00
Passing a context to StartWithContext enables context-aware reflector logging. This is the main remaining source of log spam (output to stderr instead of per-test logger) in controller unit tests. WaitForCacheSynceWithContext takes advantage of the new cache.WaitFor + NamedHasSynced functionality to finish "immediately" (= no virtual time passed) in a synctest bubble. While at it, the return type gets improved so that a failure is easier to handle. Kubernetes-commit: 5ff323de791df88880f6e065f5de4b445e5c90ed