You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once we have contextual logging and the code under test supports it, SetBuffer can be removed and get replaced with a logger that writes into a byte.Buffer. Such tests then can run in parallel.
In klog we can provide such a logger. This has the advantage that the output format will be familiar.
Another alternative is a logger that captures the raw Info and Error parameters without formatting them. This may or may not be easier to test against.
The text was updated successfully, but these errors were encountered:
/kind feature
Describe the solution you'd like
There are several unit tests which temporarily use
SetBuffer
to capture log output. There have been several cases where this led to race conditions:Once we have contextual logging and the code under test supports it,
SetBuffer
can be removed and get replaced with a logger that writes into abyte.Buffer
. Such tests then can run in parallel.In klog we can provide such a logger. This has the advantage that the output format will be familiar.
Another alternative is a logger that captures the raw Info and Error parameters without formatting them. This may or may not be easier to test against.
The text was updated successfully, but these errors were encountered: